开发者

Does jQuery mobile (or docs) perform userAgent sniffing to decide whether to generate back button?

Not owning an Android or iPhone, I tried starting Chromium browser with the "Android" and "iPhone" user agent strings. I noticed that the jQuery mobile docs sprout a back button when I start the browser with the "iPhone" UA string, but not when I do it with the "Android" string.

S开发者_如何学JAVAince JQM turned off back buttons by default, does JQM itself perform UA sniffing or did they program that into the docs specifically?


After some more work and digging I found out the following:

  1. Either my earlier observation (about presence or absence of back button depending on UA string) was incorrect, or I was looking at a different version of the docs (there are different versions for each release)

  2. Writing my own app, my own back button was NOT turned off by default. But it turns out I was using an alpha release of JQM (1.0.4), instead of the more recent beta release

  3. The beta release documentation appears to be tailored to tablet apps (has a two-column layout. Maybe it does screen size detection? I can't see that working on a phone)

In conclusion, thanks to the good folks at Stackoverflow for looking at this question. It doesn't seem to have been much of an issue at all

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜