By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,664 Members | 1,592 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,664 IT Pros & Developers. It's quick & easy.

detecting end of scroll

P: n/a
Hi,
I want to know when user has stopped scrolling. I can know the
beginning of a scroll by attaching the 'onscroll' event. But how do i
detect end of scroll. Is there any event for that ? Or is there some
other way to know that user has stopped scrolling.

I don't want to use 'onmouseup' since user can scroll using mouse
wheel as well as keyboard. So could any one help me here ?
Thanks in Advance,
Kiran.
Feb 25 '08 #1
Share this Question
Share on Google+
4 Replies


P: n/a
wolverine <ki*********@gmail.comwrites:
Hi,
I want to know when user has stopped scrolling. I can know the
beginning of a scroll by attaching the 'onscroll' event. But how do i
detect end of scroll. Is there any event for that ? Or is there some
other way to know that user has stopped scrolling.
Scroll events work more or less like the onmousemove event; there isn't
really such a thing as 'stop scrolling' or 'stop moving'. There either
is some scrolling within some time period or there isn't.
I don't want to use 'onmouseup' since user can scroll using mouse
wheel as well as keyboard. So could any one help me here ?
You could time out X ms after the last onscroll event. Just like mouse
moves.

--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
Feb 25 '08 #2

P: n/a
On Feb 25, 8:07 pm, wolverine <kiran.ha...@gmail.comwrote:
Hi,
I want to know when user has stopped scrolling. I can know the
beginning of a scroll by attaching the 'onscroll' event. But how do i
detect end of scroll. Is there any event for that ? Or is there some
other way to know that user has stopped scrolling.

I don't want to use 'onmouseup' since user can scroll using mouse
wheel as well as keyboard. So could any one help me here ?

Thanks in Advance,
Kiran.
Thanks a lot for all your replies.
Feb 26 '08 #3

P: n/a
Joost Diepenmaat wrote:
wolverine <ki*********@gmail.comwrites:
> I want to know when user has stopped scrolling. I can know the
beginning of a scroll by attaching the 'onscroll' event. But how do i
detect end of scroll. Is there any event for that ? Or is there some
other way to know that user has stopped scrolling.

Scroll events work more or less like the onmousemove event; there isn't
really such a thing as 'stop scrolling' or 'stop moving'. There either
is some scrolling within some time period or there isn't.
In contrast to scrolling, the _mousemove_ event only occurs when the mouse
cursor is moving over the element, meaning that the previous cursor position
was different to the current one. IOW, apples and oranges.
>I don't want to use 'onmouseup' since user can scroll using mouse
wheel as well as keyboard. So could any one help me here ?

You could time out X ms after the last onscroll event.
Yes.
Just like mouse moves.
No.
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
Feb 26 '08 #4

P: n/a
Thomas 'PointedEars' Lahn <Po*********@web.dewrites:
In contrast to scrolling, the _mousemove_ event only occurs when the mouse
cursor is moving over the element, meaning that the previous cursor position
was different to the current one. IOW, apples and oranges.
Are you suggesting that scoll events fire on elements that aren't
scrolled? I don't get your point.
--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
Feb 26 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.