Just included:
in the head of my page and the transitions between background colors started to work.
If you need to fade between background colors use this code:
$(document).ready(function(){
$("selector_to_your_element").hover(
function () {
$(this).animate({
backgroundColor: "red"
}, 1000 );
},
function () {
$(this).animate({
backgroundColor: "blue"
}, 1000 ); }
);
});This will work when you hover over/out your mouse over an element.




No Response to “How to Fade Background Colors with Jquery”
Leave a comment