How to run jQuery and Mootools on the same webpage?

In: Web Development| jQuery

20 Feb 2009


jQuery and Java Libraries

Running two JavaScript libraries on the same page is causing some issues, one or the other might be running but not both at the same time. The issue is that jQuery and Mootools are both using $ to call the function. There are number of fixes that could be done to make them both run on one page mainly all apply to jQuery.

This is the fix that worked for me witch I got from jQuery.com:

<script>

// Use jQuery via jQuery(…)

jQuery(document).ready(function(){

jQuery(”div”).hide();

});

// Use Prototype with $(…), etc.

$(’someid’).hide();

</script>

If this solution doesn’t work for you, there are few more workarounds check out Using jQuery with Other Libraries at jQuery.com.


Comment Form

Sponsors


  • Anupama: Yep ... Above helped me to fix my problem.. You need to look around SQL server, SQL Browser, Manag [...]
  • user: I have a remote DB so I didn't touch the SQL services. I did, however, restart the VC Mgmt Webservi [...]
  • Richard Bradac: Hello, I have same problem but it did not fix my situation. I have vCenter 4.0 DB on external S [...]
  • Clinton: Thanks, did the trick, but had to do a right click refresh to get it to load on my VC client. [...]
  • Iglon: @Daniel I agree with you, I like the stability that Linux has, the only down of Linux is lack of app [...]