I'm searching a way to have a horizontal scroller on hyperlinks and I have been taking a look on the scrollto plugin but as it seems is really outdated. Is it possible to achive the same results just with simple jquery?
$('#divToScroll').animate({'scrollTop': '20'}); // scroll to 20px
Or if you want relative scrolling:
$('#divToScroll').animate({'scrollTop': '+=20'}); // scroll to 20px below current position
Example fiddle: http://jsfiddle.net/zq4a8/
Example fiddle for horizontal scroller: http://jsfiddle.net/rGcWm/4/
$('#scroller').click(function() { $('#outer').animate({'scrollLeft': '+=20'}); });
$('#scroller_to').click(function() { $('#outer').animate({'scrollLeft': '20'}); });
scrollTop is vertical scrolling (up/down) the page. The OP said he wants "horizontal scroller" (left/right, I assume) - Sparky 2012-04-04 18:21