my JQuery code not working at all in IE8
Hey,
I'm seriously stuck. I'm using JQuery with asp in VS2008, and have a problem.
I can't seem to get my code to work with IE8, yet when I load sites that use JQuery code, the browser seems to render them and work fine. I've tested my code in Opera 9 and in Chrome and the JQuery code runs perfectly. It doesn't run in IE8; the $(document).ready(function() doesn't seem to fire.
Here's my code:
--------------
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>
</title>
<link rel="Stylesheet" type="text/css" href="styles/style.css" />
<script type="text/javascript" src="scripts/jquery/jquery-1.3.2.js" />
<script type="text/javascript" src="scripts/jquery/ui/jquery-ui-1.7.js" />
<script type="text/javascript" src="scripts/jquery/ui/ui.core.js" />
<script type="text/javascript">
$(document).ready(function() {
$("#div1").css("background", "#aaaaaa");
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="div1">
hello
</div>
</form>
</body>
</html>
-------------
All that is supposed to happen is for the JQuery code to change the background of the div. This works in Opera and Chrome, but not in IE8.
Any ideas would be greatly appreciated beyond belief as I write this at 1:18 AM while wired on coffee.
Thanks.