diff --git a/index.html b/index.html index 30e4a02..2e36de2 100644 --- a/index.html +++ b/index.html @@ -17,7 +17,7 @@ - + diff --git a/javascripts/app.js b/javascripts/app.js index 90d46c8..698f701 100644 --- a/javascripts/app.js +++ b/javascripts/app.js @@ -9,6 +9,22 @@ $(document).ready(function() { + + /* Prevent iPhone and iPad to autoscale the page when rotated + (http://adactio.com/journal/4470/) + ================================================================ */ + + if (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i)) { + var viewportmeta = document.querySelector('meta[name="viewport"]'); + if (viewportmeta) { + viewportmeta.content = 'width=device-width, minimum-scale=1.0, maximum-scale=1.0'; + document.body.addEventListener('gesturestart', function() { + viewportmeta.content = 'width=device-width, minimum-scale=0.25, maximum-scale=1.6'; + }, false); + } + } + + /* Tabs Activiation ================================================== */