jQuery and SharePoint 2010 conflict

When you try to use jQuery with SharePoint 2010 you could get problems in some browser like IE. This is caused because of conflicts with the Microsoft JavaScript selector "$", which is the same variable as the jQuery selector.

To avoid conflicts you can easily use the noConflict method of jQuery and change the selector for jQuery.

 var $j = jQuery.noConflict();  
 $j(document).ready( function() {    
   $j("#content").addClass("...");  
 });  

For more information see jQuery.noConflict.

Comments

Popular posts from this blog

Open SharePoint 2010/2013 Display, Edit, New Forms in Modal Dialogs

Ways to redirect http requests in SharePoint

Using WebDav on IIS 7 to access UNC Paths