I have made code but I want it to be execute repeatedly till the user is on the page.
Here is my code---
$(document).ready(
function animate() {
$('div.lightining').stop().animate({
backgroundColor: '#789'
}, 1050, 'linear', function() { });
}
function () { $('div.lightining').cycle(animate()); }
);
I want that the script to repeat itself after getting completed. Does someone get any ideas of achieving this. Please help me out!
Thanks in advance!
the code below will loop an animation continuously where
attribute is the attribute to animate
value the value to animate to
and duration the duration.
set these to whatever you want.
once the animation is complete the callback calls the animation again.
not sure what you mean about the on the page part. you will have to clarify there. also if im correct, you cant animate background colour without a plugin.