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">
                        <a href="#" onclick="$(this).parent().parent().hide();" title="Click to hide details">Hide Details</a>

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.


  • do you mean adding the jquery ref to an application page? Commented May 8, 2013 at 18:14
  • I updated my original post. But its a visual webpart, and I am adding this code in the ascx page.
    – omega
    Commented May 8, 2013 at 18:19

1 Answer 1


The problem is likely because you are using jQuery 2.0 which does not have support for IE 6/7/8 or IE 9/10 when running in compatibility mode (which I'm guessing SP 2010 is using. You can confirm this by using the F12 developer tools).

I would recommend using jQuery 1.9.1 for use with SharePoint and so you still have support for the older browsers.

  • Oh now I see, that was the problem. Ok I will have to stick with 1.9.1 then. Thanks.
    – omega
    Commented May 8, 2013 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.