Simulate scroll event on iPad
Generally speaking, on an iPad, if we have a fixed width/height iframe element , it should scroll automatically using 2-fingers..
But because of some issue/bug in the latest IOS, we are unable to scroll the fixed dimension element..
So is there any library or any alternate by which I can wither use iframe / object element and add code which would simulate scrolling..
I can use object element, in case there is a issue with iframe unable to receive events..But I need either of these, as I have to include a child page..
这就是你要找的:http://cubiq.org/iscroll试过了,工作正常
I would use event.initEvent. However, it's just sugestion - I'm not able to check if it works.
I use plain jquery to do the scrolling:
function scroll(div, px){
$(div).animate({scrollTop:$(div).scrollTop()+px}, 400);
}
for 200px, use as:
scroll('#my_iframe_id', 200);
链接地址: http://www.djcxy.com/p/7202.html
上一篇: WebBrowser内存问题
下一篇: 在iPad上模拟滚动事件