Y
Yansky
Hi, I have a function that I want to execute "onscroll" in Opera. But
I found that if a user has smooth scrolling enabled in the Opera
preferences, it makes Opera fire a scroll event multiple times. (I
guess that's how they achieve the smooth effect)
So how could I make it so that the onscroll event is fired once per
user scroll, but not per automatic scroll that Opera generates. Does
that make sense?
I guess I want to do something like:
if (lots of automatic scrolls events){
for(the last scroll event){
//do stuff (for people that have smooth scrolling turned
on)
}
}
else{
window.onscroll = //do stuff (for people that have smooth
scrolling turned off)
}
I found that if a user has smooth scrolling enabled in the Opera
preferences, it makes Opera fire a scroll event multiple times. (I
guess that's how they achieve the smooth effect)
So how could I make it so that the onscroll event is fired once per
user scroll, but not per automatic scroll that Opera generates. Does
that make sense?
I guess I want to do something like:
if (lots of automatic scrolls events){
for(the last scroll event){
//do stuff (for people that have smooth scrolling turned
on)
}
}
else{
window.onscroll = //do stuff (for people that have smooth
scrolling turned off)
}