Reputation:
i have a problem with jquery which works fine in IE. Firefox is saying that $ is undefined. My code below. Please help me tp sort out the problem.
<link rel="stylesheet" type="text/css" href="css/style.css" />
<!--<script type="text/jscript" src="js/jquery-1.3.2.js" > </script>
<script type="text/jscript" src="js/menu.js" > </script>-->
<script type="text/javascript">
$(document).ready(function()
{
ready();
});
</script>
Upvotes: 0
Views: 673
Reputation: 4666
That's probably misleading debugging information. The problem is that your jquery include is commented out.
Another extremely tool for debugging javascript in firefox that you might not yet be aware of is firebug. You should definitely give it a try!
Upvotes: 0
Reputation: 1206
You need to uncomment the script calls,
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/jscript" src="js/jquery-1.3.2.js" > </script>
<script type="text/jscript" src="js/menu.js" > </script>
Upvotes: 1
Reputation: 245489
The line where you include jQuery has the beginning of a comment at the beginning.
Since the line is invalid, the two browsers are handling it differently. IE is seeing the line as a comment. Firefox is not, and is therefore including jQuery.
Change:
<!--<script type="text/jscript" src="js/jquery-1.3.2.js" > </script>
to
<script type="text/jscript" src="js/jquery-1.3.2.js" ></script>
Upvotes: 2