For the below code, how do i repeat the each loop every 1 second on hover? So when the mouse is over prevbutton the each loop runs every 1 second?
$('.prevbutton').hover(function() {
container.animate({'scrollLeft': '-'+scroll}, 5000);
$('.parent-container').each(function() {
});
}, function(){
container.stop();
});
Try this