Alex
Alex

Reputation: 1084

jQuery not working in IE6 at all

I'm at a complete loss here. A client of mine uses IE6 internally and for some reason even the simplest jQuery does not work. Here is the code that will not work.

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title></title>
    <script type="text/javascript" src="js/jquery-1.4.2.js" />
    <script type="text/javascript">

        jQuery(function() {
            alert("alert from jQuery");
        });

        $(document).ready(function() {
            alert("alert from doc.ready");
        });


    </script>

</head>
<body>

</body>
</html>

I know that there are a lot of issues with IE6. Ive tried a bunch of the workarounds that I found on the internet (like putting the script at the bottom of the page, removing the type attr) and no dice. any help would be greatly appreciated.

Upvotes: 1

Views: 683

Answers (1)

djdd87
djdd87

Reputation: 68456

This will not work in a lot of browsers actually because you've not included the script properly. You must do the following:

<script type="text/javascript" src="js/jquery-1.4.2.js"></script>

The script tags must be done as above or the script will not be included.

Upvotes: 7

Related Questions