I am testing my webpage on a server using preview dns. Just realized that preview dns automatically adds mootools library towards the end of any php page. Probably for their own statistics or something.
But the problem is that I am using jquery in my page. So My jquery code breaks because both mootools and jquery both use ‘$’.
I’ve put all the page source of my page on jsbin: http://jsbin.com/ozime (this includes the added on mootools).
In this page I’ve added a sample jquery code which should trigger on change of the drop down box. I added some alert statements as well. However, only first alert statement shows up. One inside jquery code does not.
I’ve tried to use jquery no conflict but it does not seem to work.
Has someone faced this issue?
After you include jQuery, add the following in a script tag immediately after it.
Also place your jQuery script before your mootools library. Order will be:
jQuery script include
noConflict code
mootools script include