My company has a web application that has a plain javascript in it, and it use $ -"dollar symbol" in it's own way as shown:
function $(e) {
return document.getElementById(e);
}
The problem is when I embed the jquery to the page there is a conflict occurs. Is there a way that I can isolate the jquery example:
$$(this) - is to call jquery and $(this) - to call old staff
please help me thank you
Just make sure you include your lib first, then call
$.noConflict();
var $$ = jQuery;
That will restore $ to what it used to be before jQuery was parsed and make $$ point to jQuery http://api.jquery.com/jQuery.noConflict/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With