What does jQuery.noConflict() do?

<p id="t">Text</p>
var $j = jQuery.noConflict();
console.log('$ is ' + typeof window.$);
$j('#t').text('Works with $j');
console.log($j('#t').text());
Console output

$ is undefined
Works with $j

WordPress loads jQuery in this mode, so scripts there use jQuery(...). See noConflict.


Learn more about the similar topics:
Tutorials
jQuery Introduction
jQuery Get Started
jQuery Syntax
jQuery Document Ready Function
jQuery noConflict() Method
jQuery vs Vanilla JavaScript
jQuery 4 and Upgrading from jQuery 3
Exercises & Assignments
No Content Found.
Interview Questions & Answers
What is jQuery?
What are the advantages of jQuery?
What is the difference between jQuery and JavaScript?
How do you add jQuery to a web page?
What is the document ready function in jQuery?
What is the difference between $(document).ready() and window.onload?
What is the $ sign in jQuery?