Is it possible to animate the position of a CSS3-gradient-color using jQuery?
I\'d like to animate from this
background: -moz-linear-gradient(top, #F
This is a code snippet of one of my project where I use gradient transition using jquery.This may help you:
Change Gradient
var p1 = t = 0;
var p2 = 100;
function hello() {
p1 = p1 + 5;
p2 = 100 - p1;
if(p1 <= 100 && p2 >= 0) {
$('#gr_anim').css({
'background-image':'-moz-linear-gradient('+ p1 +'% '+ p2 +'% 45deg, #000, #fff)'
});
} else {
clearTimeout(t);
}
t = setTimeout('hello()',1000);}
$( function() {
hello();});