Last active
December 18, 2015 15:29
-
-
Save kontur/5804776 to your computer and use it in GitHub Desktop.
Fix mobile IE10 device viewport, by http://trentwalton.com/2013/01/16/windows-phone-8-viewport-fix/
This file contains hidden or 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
if (navigator.userAgent.match(/IEMobile\/10\.0/)) { | |
var msViewportStyle = document.createElement("style"); | |
msViewportStyle.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")); | |
document.getElementsByTagName("head")[0].appendChild(msViewportStyle); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment