Forums

Skip Navigation LinksHome / Developer Network / Forums / Sitefinity: Sitefinity SDK > jquery conflict

jquery conflict

  • siby avatar

    Posted on Jan 19, 2012 (permalink)

    Hi,

     In a scenario where there are a multiple user controls are available to a page and a particular one references "lightbox.js" thru "<script src=.." and "prototype.js"  thru "<script src=.." reference in the user control itself and there is a custom image gallery in it.

     There is another one which has a jquery script running on that and is supposed to serach thru the DOM in the usercontrol itself and highlight something. Also it has

    "<sf:ResourceLinks ID="resourcesLinks" runat="server">
        <sf:ResourceFile JavaScriptLibrary="JQuery" />
    </sf:ResourceLinks>"

    on it and is inserted in the template level.

    When the page is loaded   can see a javascript error

    "Object doesn't support this property or method  prototype.js, line 5643 character 9"
    " 'null' is null or not an object"   >> referencing the second user control

    and because of this the jquery in the second usercontrol is not working and the light box effect that the first one to show is not proper in IE.

    But for the other pages with the second one inserted in the template level, and there is no light box stuff, is working fine.

    Please reply asap and give info on how to rectify that.

    Reply

  • Posted on Jan 20, 2012 (permalink)

    How are you linking in your external scripts?

    With plain link tags?  Javascript widget?

    Reply

  • Lubomir Velkov Lubomir Velkov admin's avatar

    Posted on Jan 23, 2012 (permalink)

    Hello Siby,

    Could you please give us more details - do you use a .master page for your template? Could you replace the ResourceLinks control with a direct <script src> tag in your head tag?

    Regards,
    Lubomir Velkov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

Skip Navigation LinksHome / Developer Network / Forums / Sitefinity: Sitefinity SDK > jquery conflict