开发者

Detect if css position overflow is working?

As iOS5 beta has fixed css property overflow: scroll and overflow: auto, I’d like to target the older iOS versions with Javasc开发者_运维百科ript.

Is there a way to check with JS if the property is actually working or not? Trying to get the style property does alert the correct value in both Mobile Safaris, but in the current version it requires a two-finger scrolling to work.


I don't know of a way to check if the scroll property is working but you could check the user-agent to determine which version of iOS they're running (3.2 in the following example):

Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜