Ok so basically I'm implementing a simple horizontal scroller. The function gets fired when I move the mouse into the correct div but only once and doesn't keep looping after the interval time. Any help appreciated:
$(document).ready(function() {
$('#toparrow').mouseenter(function(e) {
var func = scrollroller(1);
setInterval(func,1);
}).mouseleave(function() {
});
function scrollroller(velocity) {
$('#roller').animate({left:'+='+velocity},1);
}
});