If you're talking about the browser scrollbars, I'm not sure how to listen for someone clicking on them.
But if you can figure that part out, you can use the scrollTop property of a DOM element before and after the click.
Note, while it works in FF and IE, I'm not sure what it does in Safari (haven't tested it). From Mozilla Developer Center:
scrollTop is part of the MSIE's DHTML object model. scrollTop is not part of any W3C specification or technical recommendation.
http://developer.mozilla.org/en/docs/DOM:element.scrollTop // before click var before = $('#id1')[0].scrollTop; // after click var after = $('#id1')[0].scrollTop; var diff = after - before; something like that --Karl _________________ Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 12, 2008, at 12:47 AM, edward wrote:
I am trying to find a reliable way to determine how many pixels the scroll bar has moved when the user clicks on the scroll up/down buttons. It seems to be different on every browser and even different on the same browser on different operating systems. Ideally what I would like is a way to either set this value or to determine what it is. My goal is to map the scroll movements from one div onto another such that each up/down click on the first div translates into a specific delta on the second div that I define. Any help would be greatly appreciated!