I\'m quite new to jquery and can\'t seem to figure out why my code isn\'t working. I have a horizontal layout and want to use the scrollLeft() function (which works perfect
You'll want something like this:
$("#next").click(function(){ var currentElement = currentElement.next(); $('html, body').animate({scrollLeft: $(currentElement).offset().left}, 800); return false; });
scrollTop