How to properly use jQuery noConflict mode in WordPress

How to properly use Jquery noConflict mode because many times we face jQuery Conflict error. so let’s see how to write noConflict jQuery on WordPress.

So when you write jQuery on WordPress write a syntax like below.

(function($){

  $(document).ready(function(){
      // write code here
  });

  // or also you can write jquery code like this

  jQuery(document).ready(function(){
      // write code here
  });

})(jQuery);

Then write your jQuery code without Conflict you can write with ‘$’ or ‘jQuery’. So create a jQuery without conflict.

If you face any problem after using this code write the comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s