Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

javascript zoom out

I have a web page which users can pinch/pull to zoom in and out of pictures.


What I want is a way in Javascript to go back to 1:1 iPad zoom, so you again see the whole page width, just as when you entered it.


Any ideas?

MacMini 2011 i5, 8GB, Radeon 6630M -OTHER, Mac OS X (10.7), iPhone4; headless dual G5 via FW800

Posted on May 7, 2012 8:56 AM

Reply
6 replies

Sep 10, 2013 12:35 PM in response to William Donelson

William Donelson wrote: Perhaps you can re-load the page "replace" with Javascript, not sure. I might try this later this week.


--> window.location.replace(location.href)

I tried ths. It's a hack, but seems to work in a messy way...


Try it and see what you think.


window.location.replace(location.href); // essentailly zoom out to "original size & scroll"
myPic.width = fitWidth; // fit it into window (fitWidth is width of screen minus 100 pixels)
window.scroll(fitWidth/2, 0); // scroll to top of page

javascript zoom out

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.