Where do we use jQuery.noConflict() method?

jQueryWeb DevelopmentFront End Technology

jQuery.conflict() method allows you to use multiple frameworks, while using jQuery. The $ sign is used for jQuery, but what if other frameworks also use the same $ sign; this may create issues and conflict. To avoid this, jQuery issued the noConflict() method. The method releases the $ sign to be used my other JavaScript frameworks. Use jQuery with the name, jQuery.


You can try to run the following code to learn how to work with the noConflict() method −

Live Demo

<!DOCTYPE html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
      jQuery("h3").text("jQuery works perfectly");
<h1>Testing jQuery</h1>
<h3>Click below:</h3>
<button>Click me</button>
Published on 06-Dec-2017 23:22:54