Daniel D
Daniel D

Reputation: 3677

jQuery Mobile/Rails 3.0 app doesn't look mobile

I can't figure out what I'm doing wrong -

I have a jQuery mobile app - and it appears to have the right jquery mobile styling - headers, footers and rounded buttons - but when I browse to a site on a mobile device, it looks really zoomed out - or as if the native width on the device had a higher pixel count.

Not sure what's the easiest way to get that to render correctly on a mobile device. Am I missing something?

Thanks in advance!

--Dan

Upvotes: 0

Views: 123

Answers (1)

J.T.Sage
J.T.Sage

Reputation: 1984

Assuming you are using Beta1, and didn't read the release notes carefully (I did not), you are likely running into the fact that jQM does not set the viewport by default anymore. Add something like:

<meta name="viewport" content="width=device-width, initial-scale=1">

to the head of your document, it should have better results. If you are interested in why, more information is available in the release notes here: http://jquerymobile.com/blog/2011/06/20/jquery-mobile-beta-1-released/ under the "Pinch-to-zoom" heading.

Upvotes: 4

Related Questions