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

Ways to redirect http requests in SharePoint

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

How to create a FAQ in SharePoint with OOB features