I need to change the style of an element after the user has scrolled down beyond a certain number of pixels, and then change it back once the user has scrolled back up. I\'m
See scrollTop, scrollLeft and Events/Scroll.
Example:
$('div#something').scroll(function () { if ($(this).scrollTop() > 200) { $(this).addClass('foo'); } else { $(this).removeClass('foo'); } });