Created
October 29, 2010 07:19
-
-
Save gjcourt/653079 to your computer and use it in GitHub Desktop.
get the scale on all iDevices
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function scale() { | |
return document.body.clientWidth / window.innerWidth; | |
} |
I gather this only works on the iPhone? It does not work on Desktop Chrome.
- there are many post with this calcule, but I didn't understand when it's working
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does this work if meta viewport width is set to specific value, for example - 960px?