質問

I am trying to detect a scroll event on Windows Mobile IE 6 However, Mobile IE 6 doesn't seem to support a scroll event of any type. Is there something I'm missing here? Here is some sample code:

$(window).scroll(function(){
      alert('test');
  });

Is there any kind of workaround? It seems like i'm going to have to do a timer to check for scrollTop value changes.

EDIT MSIE 6.0 Windows NT 5.1; Windows Phone 6.5

役に立ちましたか?

解決

It doesn't appear possible. I did achieve a workaround using a javascript interval that checks for changes in the scrollTop variable.

他のヒント

mobile browsers do not support 'real' scroll event. They will fire the 'scroll' event once after stopped scrolling. So you can not do anything while element is scrolling. You can use a timer to check scrollTop, but my suggestion is use a lib like 'iscroll' to handle the 'scroll' event. iscroll in gitHub

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top