I am making an visual webpart in Sharepoint 2010, and I am trying to load my jquery files in the ascx page.
Near the top of the page I have this:
<SharePoint:CssRegistration ID="jquery_css" name="/_layouts/PDF Library/blitzer/jquery-ui-1.10.3.custom.min.css" runat="server" EnableCssTheming="true" after="true" />
<SharePoint:ScriptLink ID="jquery_js" name="/_layouts/PDF Library/jquery-2.0.0.min.js" runat="server" OnDemand="False" Localizable="False" />
<SharePoint:ScriptLink ID="jquery_ui_js" name="/_layouts/PDF Library/jquery-ui-1.10.3.custom.min.js" runat="server" OnDemand="False" Localizable="False" />
And near the middle of the page I have this:
<asp:Panel id="help_panel" runat="server">
Click <a href="#" onclick="$(this).next().slideDown();" title="Click to show details">here</a>.
<div style="display:none">
<ol>
<li>1</li>
<li>2</li>
<li>3</li>
<a href="#" onclick="$(this).parent().parent().hide();" title="Click to hide details">Hide Details</a>
</ol>
</div>
<br/>
</asp:Panel>
When the asp.net page loads in IE9, and when I click the link to display the div tag, it does not work, the error message was The value of the property '$' is null or undefined, not a Function object
.
However if I check the developer tools, I see that the jquery and css files are there. Yet the link doesn't work. Maybe the files are being loaded after the link gets processed?
Does anyone know how to fix this?
It works in Firefox 21 beta, but I want it to work in IE9.
Thanks.