jquery conflict

Posted by Community Admin on 05-Aug-2018 10:16

jquery conflict

All Replies

Posted by Community Admin on 19-Jan-2012 00:00

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.

Posted by Community Admin on 20-Jan-2012 00:00

How are you linking in your external scripts?

With plain link tags?  Javascript widget?

Posted by Community Admin on 23-Jan-2012 00:00

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

This thread is closed