Removed 'maximum-scale=1.0' from meta tag. Mobile visitors should be able to zoom. Added JS fix for the iOS bug where the site will autozoom whenever the orientation is changed (see http://adactio.com/journal/4470/).
This commit is contained in:
parent
b61c4b890f
commit
b63da767e8
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<!-- Mobile Specific Metas
|
<!-- Mobile Specific Metas
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
|
||||||
<!-- CSS
|
<!-- CSS
|
||||||
================================================== -->
|
================================================== -->
|
||||||
|
@ -9,6 +9,22 @@
|
|||||||
|
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(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
|
/* Tabs Activiation
|
||||||
================================================== */
|
================================================== */
|
||||||
|
Loading…
Reference in New Issue
Block a user