I have a problem with jQuery vertical scroll.
I have to add some animation on this example :
$(document).ready(function() {
var timeoutId = 0;
function scrollIt(amount) {
$('#scroller').scrollTop($('#scroller').scrollTop()+amount);
}
$('#down').mousedown(function () {
timeoutId = setTimeout(scrollIt(5), 1000);
}).bind('mouseleave', function () {
clearTimeout(timeoutId);
});
$('#up').mousedown(function () {
timeoutId = setTimeout(scrollIt(-5), 1000);
}).bind('mouseleave', function() {
clearTimeout(timeoutId);
});
});
Here is a fiddle : http://jsfiddle.net/TPKDG/1/
and I don't know how :(
where I have to add .animation()?
Thank's a lot for help