IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
By default, Sitefinity CMS uses the built-in jQuery library (version 1.8.3). In some cases you may require a different version of jQuery to support a Javascript library written for a specific version. However, simply including a second version of jQuery may cause unexpected conflicts.
NOTE: To check the current version of jQuery, use the $.fn.jquery property.
To correctly include a version of jQuery that is different than the built-in version, you need to use the jQuery.noConflict() method to wrap your custom logic in a function scope and avoid conflicts:
var
jq14 = jQuery.noConflict(
true
);
(
function
($) {
$(document).ready(
() {
// your logic
});
}(jq14));
After loading a second version of jQuery, calling the jQuery.noConflict(true) method restores the globally scoped jQuery variables to those of Sitefinity’s built-in jQuery library. In the code above, the variable jq14 is passed to a function scope. Inside that function scope, Sitefinity’s version of jQuery is overridden and any code placed in the scope accesses the jQuery version you loaded.
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important