Search code examples
javascriptmobile-safarizoomingmobile-websitejquery-mobile

Is is possible to change page zoom in Mobile Safari via Javascript?


I have a site using jquerymobile. It loads an initial webpage, and then as other pages are clicked, they are loaded in an "overlay" which slides over the top.

Just like this: http://jquerymobile.com/demos/1.0a4/

..except mine has pinch zoom enabled.

I want the zoom state to be independent on each page the user sees. So, if a user starts on page one, opens an "overlay", zooms in, and then closes the "overlay" -- I want the first page to reset to the original zoom level.

Is this possible?


Solution

  • No there is no way to control browser zoom. You should use JavaScript to zoom (or scale) your objects in the browser. It's best to switch pinching off by setting user-scalable to no