Tuesday, May 1, 2012

How to avoid the conflit of Jquery

In this post i will help you to avoid the conflict of jquery.If you have the problem of one of the jQuery file will not loaded this post will help you.First step of to set a variable call the Jquery instead of regular "$" symbol.

var $myJq= jQuery.noConflict();
Then through out your jquery program call $myJq instead of "$".
var $myJq= jQuery.noConflict();

$myJq(document).ready(function () {
$myJq(“#menu ul li:last-child”).addClass(“last”);
$myJq(“#menu li”).hover(function() {
Using this type you can add Moo tools frame work to your pages.