Jayesh Patel
Filed under - JavaScript, jQuery, Mobile Application, Other Stuff
No Comments so far. Add yours now

Orientation Scale Bug Fix for iOS

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);
from: http://adactio.com/journal/4470/

Leave your comment

You must be logged in to post a comment.

Share IT © 2018. All rights reserved.