1. After running this function, you can resume using the alias $ and still use $ as an alias for jQuery in the scope of this function.
jQuery Code:
jQuery.noConflict();
(function($) {
$(function() {
// Code that uses $ as jQuery alias
});
}) (jQuery);
// Code based on other libraries using $ as alias
2. After running this function, you can create a new jQuery alias to replace the original jQuery Alias $ to use.
jQuery Code:
var j = jQuery.noConflict();
// Code using the new alias jQuery
j("div p").hide();
// Using $ as an alias based on other libraries The code of
$("content").style.display = 'none';
Note: This function must be imported after you import jQuery file and before importing another library that causes a conflict.