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 |
|---|
| No Content Found. |
| Exercises & Assignments |
|---|
| No Content Found. |
| Interview Questions & Answers |
|---|
| No Content Found. |