Try Now
More in this section

Forums / Sitefinity SDK / jquery conflict

jquery conflict

3 posts, 0 answered
  1. siby
    siby avatar
    48 posts
    21 Feb 2009
    19 Jan 2012
    Link to this post

     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" />

    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.
  2. Steve
    Steve avatar
    3037 posts
    03 Dec 2008
    20 Jan 2012
    Link to this post
    How are you linking in your external scripts?

    With plain link tags?  Javascript widget?
  3. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    03 Nov 2014
    23 Jan 2012
    Link to this post
    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?

    Lubomir Velkov
    the Telerik team

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

3 posts, 0 answered