jQuery Plugins and/or authoring custom jQuery functions not working
I'm trying to use some JQuery Plugins and add custom jQuery functions. These just don't seem to work no matter what method I try.
I've tried putting them in as ResourceLinks:
First placing <%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sf" %> just below <%@ Master Language="C#" %>
and then placing
<
sf:ResourceLinks
ID
=
"resourcesLinks"
runat
=
"server"
>
<
sf:ResourceFile
JavaScriptLibrary
=
"JQuery"
/>
<
sf:ResourceFile
Name
=
"~/Sitefinity/WebsiteTemplates/Library/App_Themes/Library/Global/Scripts/jquery-ui-1.8.23.min.js"
Static
=
"True"
/>
<
sf:ResourceFile
Name
=
"~/Sitefinity/WebsiteTemplates/Library/App_Themes/Library/Global/Scripts/showHide.js"
Static
=
"True"
/>
</
sf:ResourceLinks
>
<
sf:ResourceLinks
ID
=
"resourcesLinks"
runat
=
"server"
>
<
sf:ResourceFile
JavaScriptLibrary
=
"JQuery"
/>
</
sf:ResourceLinks
>
<
sitefinity:JavaScriptEmbedControl
ID
=
"script1"
runat
=
"server"
ScriptEmbedPosition
=
"BeforeBodyEndTag"
Url
=
"~/Sitefinity/WebsiteTemplates/Library/App_Themes/Library/Global/Scripts/jquery-ui-1.8.23.min.js"
/>
<
sitefinity:JavaScriptEmbedControl
ID
=
"script2"
runat
=
"server"
ScriptEmbedPosition
=
"BeforeBodyEndTag"
Url
=
"~/Sitefinity/WebsiteTemplates/Library/App_Themes/Library/Global/Scripts/showHide.js"
/>
<
asp:ScriptManager
ID
=
"ScriptManager"
runat
=
"server"
LoadScriptsBeforeUI
=
"true"
>
<
Scripts
>
<
asp:ScriptReference
Path
=
"~/Sitefinity/WebsiteTemplates/Library/App_Themes/Library/Global/Scripts/jquery-1.8.2.min.js"
ScriptMode
=
"Release"
/>
</
Scripts
>
</
asp:ScriptManager
>
Worked with the JavaScriptEmbed Control method
Richard,
I am having the same issue you had with the jQuery functions not working. I have tried using the Resource Links tags with both the jQuery library file and the specific one. I have also tried your example with the JavaScriptEmbedControls and these don't work either. I have also tried just script tags to embed the files, but still nothing seems to work.
I have also made sure my master page file hasn't duplicated any of the same references. Can you give me an example with code that worked?
This is one of those persistent things which I FEEL like will never be officially addressed, and it's so amazingly frustrating.
I had this happen yesterday...firebug shows jquery and kendo loading at the top of the page. My script was loading at the bottom of the page. Firebug validates all of this, and yet nothing but kendo is undefined errors. If I yank it out to a .html page or a standard aspx page, all works fine....in SF though, it's like pulling teeth.
Hey Caleb sorry I hadn't seen your post. The code I put in is exactly what I'd explained above. Though now I'm trying to integrate some Google Map Plugin scripts and they aren't working though when I put them in a Coldfusion page they load fine...go figure.
I'm still looking for a reliable way to use Javascript plugins. Does anyone have a fool proof way to do this?
Hey Richard,
If you can/want drop me an email ( jbokkers [at] live [dot] nl ) and I'll try and help you out with getting Jquery and the custom plugins working properly together...
Jochem