Path to jQuery
Hi,
I'd like to reference the jQuery namespace in Sitefinity (I need to in order to work around a ResourceLinks script order bug). For now, I'm doing "Telerik.Sitefinity.Resources.Scripts.jquery-1.6.2.min.js". This is not convenient, because the jQuery version is referenced, and it keeps changing with each Sitefinity version, forcing me to update my code each time I update Sitefinity.
Can I dynamically retrieve the version of the jQuery shipped with Sitefinity? Or is there a reliable jQuery path that never changes, or something?
Thanks.
Hello Thomas,
You can reference to the built - in Jquery in Sitefinity ( for example in a masterpage ):
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sf" %>
// your logic here
<
sf:ResourceLinks
id
=
"resourcesLinks"
runat
=
"server"
>
<
sf:ResourceFileJavaScriptLibrary
=
"JQuery"
/>
</
sf:ResourceLinks
>
Hi Victor,
Yes, I know. As I said, the reason I don't do this is due to a bug in the ResourceLinks control (to sum things up, jQuery is loaded too late if I do what you propose). This is detailed here. I went for the CompositeScript approach that Radoslav suggested there.
Can you propose another solution? Also, do you know if there is a PITS report for the ResourceLinks problem?
Thanks.
Hello Thomas,
Currently there is no other way around this as the problem is coming from the RadScriptManager which is explained by my colleague Radoslav. We have forwarded this request to the teams managing the RadControls so they can diagnose and fix the problem.
All the best,
Victor Velev
the Telerik team