Skip to content

Instantly share code, notes, and snippets.

@gjcourt
Created October 29, 2010 07:19
Show Gist options
  • Save gjcourt/653079 to your computer and use it in GitHub Desktop.
Save gjcourt/653079 to your computer and use it in GitHub Desktop.
get the scale on all iDevices
function scale() {
return document.body.clientWidth / window.innerWidth;
}
@panzi
Copy link

panzi commented May 22, 2014

I gather this only works on the iPhone? It does not work on Desktop Chrome.

@robsongajunior
Copy link

  • 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