2011-10-26 29 views
0

我需要知道我的webapp是否可以使用-webkit-overflow-scrolling: touch; overflow: scroll;,否则我可以使用iScroll获得该功能。如何在全屏模式下获取iPhone或iPad浏览器/固件版本

我通过MooTools检查,如果本机滚动溢出这样

if(Browser.version < 5.1) console.log('fix it with iScroll') 
else console.log('the native scrolling is available'); 

问题实施:如果我web应用程序保存到跳板,在全屏模式下Browser.versionBrowser.name给我0 ''unknown'

if(Browser.version < 5.1 || Browser.version == 0) console.log('fix it with iScroll') 
else console.log('the native scrolling is available'); 

上述解决方案的工作很好,但我不希望在iOS5的全屏模式总是使用iScroll,因为它不是光滑如本地滚动。

我怎样才能知道固件的版本或本机滚动是否在全屏模式下可用?

回答

1

似乎有什么东西是打破了与Mootools 1.4.0。 确定您是否正在运行ios5(浏览器或全屏模式):

(/CPU OS 5_0/.test(navigator.userAgent) ? console.log('iOS5') : console.log('not iOS5'); 
相关问题