Skip to content Skip to sidebar Skip to footer

Jquery And Prototype Noconflict

I got an conflict between jquery and prototype. HTML Nor-AvetisyanCopy

Then you can use this jQ variable like you were using $:

jQ('#corner-calq').hide();
jQ('#site-content-dproc').mouseover(function() {
    jQ('#corner-calq').fadeIn(1000);
});
jQ('#site-content-dproc').mouseout(function() {
    jQ('#corner-calq').fadeOut(1000);
});

Although I'd probably prefer leaving the code as is, instead scoping it within a self-calling anonymous function.

(function($) {
    $('#corner-calq').hide();
    $('#site-content-dproc').mouseover(function() {
        $('#corner-calq').fadeIn(1000);
    });
    $('#site-content-dproc').mouseout(function() {
        $('#corner-calq').fadeOut(1000);
    });
})(jQuery);

Post a Comment for "Jquery And Prototype Noconflict"