- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Where do we use jQuery.noConflict() method?
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.
Example
You can try to run the following code to learn how to work with the noConflict() method −
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $.noConflict(); jQuery(document).ready(function(){ jQuery("button").click(function(){ jQuery("h3").text("jQuery works perfectly"); }); }); </script> </head> <body> <h1>Testing jQuery</h1> <h3>Click below:</h3> <button>Click me</button> </body> </html>
- Related Articles
- Where do we use $.extend() method in jQuery?
- Why do we use JSON.stringify() method in jQuery?
- Why do we use jQuery over JavaScript?
- How do we use jQuery selector eq:()?
- How do we use # in jQuery Attribute Selector?
- How do we use .not() with jQuery selector?
- Where do we use scope Resolution Operator (::) in C#?
- How do we use jQuery Attribute selector with a period?
- How do we use wildcard or regular expressions with a jQuery selector?
- How do we use re.finditer() method in Python regular expression?
- Why do we use re.compile() method in Python regular expression?
- How do I use jQuery effects?
- How to use hasClass() method in jQuery?
- How to use removeClass() method in jQuery?
- How to use jQuery.wrapInner() method in jQuery?

Advertisements