Im using the MVC 2 framwork and have added some javascript for expanding divs. It works fine in firefox, chrome, opera and safari but not in internet explorer. I get an 'Object Expected' Error. Here is my code
the jquery import is in the site.master file
 <head runat="server">
<title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title>
<link href="../../Content/Site.css" rel="stylesheet" type="text/css" />   
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js" charset="utf-8"></script>
The Javascript, in the mvc view: the test alert comes up in IE but test2 doesn't.
   <script type="text/javascript">
    alert("test");
    $(document).ready(function () {
        alert("test2");
        $(".expandingcontent").hide();
        $(".divexpand").click(function () {
            var divID = "#" + $(this).attr("id").substring(6);
            if ($(divID).is(":hidden")) {
                $(divID).slideDown("slow");
            } else {
                $(divID).hide();
            }
        });
    });
</script>     
Ive tried placing the javavscript at the beging of the page, at the end nothing seems to work. Ive also tried using a timeout but no success there either. I'm using IE 8, any help is very much appreciated Thanks!
 
     
     
     
     
    