Last Updated: February 25, 2016
·
1.857K
· svilenv

Auto-resizing Page Elements With Jquery Mobile

If you’ve been using jQuery Mobile from the start or if you’re just beginning to play with it (beta 3 is current at the time of this writing) you might have noticed that in recent versions auto-resizing of page elements does not work for all devices out of the box and this was not the case in earlier versions. The answer is simple, but not well documented (if at all): you need to add the viewport meta tag in your layout:

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