Problems getting jQuery scripts to work if only added to the master page
I have a custom widget control that uses jQuery. It only works if I add the jQuery lib to the master page AND to the user control. Adding it only in the master page OR the user control and it doesn't work. Also, it only works if I add the scripts using a JavascriptEmbedControl. If I add them using ResourceLinks, in both places OR in one or the other it never works.
What's going on? Can someone clarify?
Thanks
Anyone?
My first question is how are you including your javascript libraries to your sitefinity project. I have not had the same issue you are describing using the following method on my master page.
<
asp:ScriptManager
ID
=
"ScriptManager"
runat
=
"server"
LoadScriptsBeforeUI
=
"true"
>
<
Scripts
>
<
asp:ScriptReference
Path
=
"~/Sitefinity/WebsiteTemplates/NiSource/App_Themes/Default/JavaScript/jquery-1.7.1.min.js"
ScriptMode
=
"Release"
/>
</
Scripts
>
</
asp:ScriptManager
>
<
asp:ScriptManagerProxy
ID
=
"test"
runat
=
"server"
>
<
Scripts
>
<
asp:ScriptReference
Path
=
"~/Path/javascript.js"
ScriptMode
=
"Release"
/>
</
Scripts
>
</
asp:ScriptManagerProxy
>