开发者

HTML website & jquery webpage for mobile

My expertise is somewhat limited, but I have a HTML5 website which works well on screen and tablets, but not so good on mobile devices. My thoughts are for creating a jquery Mobile website just for mobile devices; as it's mainly all text.

So my question is how can I link the two sites, so the main we开发者_如何学JAVAbsite will be available for all devices bar mobile, in which case the jquery Mobile website will be displayed?

Can this be achieved and how?


An alternative to using jQuery would be styling your website based on the screen resolution of the device the user is using. You can use CSS Media Queries (would post link, but my reputation isn't high enough to do more than two; check the css-tricks.com website for "CSS Media Queries & Using Available Space") to create styles based on screen resolution. Alternatively, there are some other options that can specify how the website is viewed by using meta viewport tags and javascript. See here for some information of how this can be accomplished.

If you still wanted to use jQuery Mobile, you could detect the device by using a user agent match in javascript. Here some information on that:

Loading JS script for only iOS devices?

Hope this helps!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜