Pages

Thursday, September 30, 2010

Using jQuery with Sitecore and avoiding conflicts with Prototype

When using jQuery with Sitecore you need to take additional steps so that the jQuery $ function doesn't interfere with the Prototype $ function that Sitecore uses for the Sitecore Ribbon.

Example from api.jquery.com

jQuery.noConflict();
(function($) { 
  $(function() {
    // more code using $ as alias to jQuery
  });
})(jQuery);
// other code using $ as an alias to the other library

See Also:

No comments:

Post a Comment