473,387 Members | 1,650 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

detecting end of scroll

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
4 5031
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Frances Del Rio | last post by:
pls, why is this not working? <SCRIPT language=JavaScript type="text/javascript"> var br = '<SCRIPT language=Javascript' br += 'src="js_pop.js" type="text/javascript">' br += '</SCRIPT>' var...
6
by: Csaba2000 | last post by:
How do I detect when the font size has been changed (especially by user action: either Ctrl+Scroll wheel or View/Text Size)? This is just for use on IE 5.5+, but it would be great if there was a...
2
by: London Boy | last post by:
Hi, i've done a script that makes a DIV appear and follow the mouse cursor and it works fine but, it has a small glitch, when i scroll the document, the DIV doesn't appear beside the cursor but...
20
by: Mandy Memphis | last post by:
If I perform a mousedown within a document, move the mouse outside the browser window, and then release the mouse button, the document.onmouseup event does not fire. Is there any way to detect a...
7
by: Michael Crute | last post by:
I did a search and basically came up with nothing for this question, but if I missed the answer, I apologize in advance, please just point me in the right direction. OK, I am using a JavaScript...
1
by: Dan Neely | last post by:
I have a listviw with the column default widths adjusted to fill the entire width without any scroll bars. If there are enough items added to the list that a vertical scroll bar is added I'd like...
2
by: Robert Dufour | last post by:
In Vs 2005 Vb.Net How do you detcet the arrow keys, the function keys, the Ctrl Key, The shift key, the PrintScreen key, scroll lock key NumLock key. I know how to detect the keys that return ascii...
1
by: Przemek M. Zawada | last post by:
Dear Group, I have got two mice connected to one PC (notebook). In example I click parallel left button on mouse A and left button on mouse B. Is it possible, programmatically detect which on...
15
by: RobG | last post by:
When using createEvent, an eventType parameter must be provided as an argument. This can be one of those specified in DOM 2 or 3 Events, or it might be a proprietary eventType. My problem is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.