Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Preventing Zoom in Phonegap + JQuery Mobile

I'm building a PhoneGap + JQuery Mobile app, but I can't seem to prevent it from zooming in with a double click. I followed the tips listed at http://www.tricedesigns.com/2012/01/17/mobile-web-phonegap-html-dev-tips/, specifically by adding:

<meta name="viewport" content="width=device-width, user-scalable=no" />

Does anyone know of a solution for zooming?

like image 865
Anthony Avatar asked Apr 24 '12 01:04

Anthony


2 Answers

Try:

<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" />

This is what I use and I don't get any zooming behavior.

Here is the Apple documentation for the viewport meta tag: https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html

like image 104
Jasper Avatar answered Nov 21 '22 21:11

Jasper


Place "user-scalable=no" in to your meta tag

like this

  <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
This is the best way to stop zoom in mobile, Its work for me in phonegap
like image 34
Sarbasish Mishra Avatar answered Nov 21 '22 23:11

Sarbasish Mishra