Resolving jQuery conflicts
I’m a newbie on jQuery… when i integrate tons good wordpress plugin, it’s always a nightmare because there is always had var conflicts, so there have a function call jQuery.noConflict(); for solving such kind of conflicts, you just modify the control script to jQuery(foo) instead of $(foo), cool?
read this article http://jquery-howto.blogspot.com/2009/07/jquerynoconflict-resolving-conflicts.html
<html> <head> <script src="prototype.js"></script> <script src="jquery.js"></script> <script> jQuery.noConflict(); // Use jQuery via jQuery(...) jQuery(document).ready(function(){ jQuery("div").hide(); }); // Use Prototype with $(...), etc. $('someid').hide(); </script> </head> <body></body> </html>
levin 12:16 pm on December 18, 2009 Permalink |
a better method is declare a distinguish var in jQuery.noConflict
var $myjQ = jQuery.noConflict();