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
what about animating the width of the container to which the gradient applies ?
(example for Chrome with JQuery)
html:
css:
#test
{
width:400px; height: 400px; float:left;
background: linear-gradient(90deg, #5e5e5e 0%, #000 100%);
}
js:
$('#click_me').on('click',function ()
{
$('#test').animate({'width':'+=400'},400);
}
);
works a treat
EDIT: I've made a mistake here as regards the original question. I am going to leave the answer here though as I think that by using more elements than just one the position of the fade could be moved about with the animate() function within a container div, creating the effect of the fade position sliding