diff options
| author | Mark Otto <[email protected]> | 2014-04-24 18:50:30 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2014-04-24 18:50:30 -0700 |
| commit | fe11ac77a26ab321bb6648d557a15416bab1d74e (patch) | |
| tree | 1e352422c3f3b61f8b0bd90e5ead2e6dd2d340d8 /docs/assets/js | |
| parent | 0e48cb2f9383df0ba4ba54168f8730b4694bee0c (diff) | |
| parent | 448086f95a9114fb9ad96b76c5fc7b12a6fc51fd (diff) | |
| download | bootstrap-fe11ac77a26ab321bb6648d557a15416bab1d74e.tar.xz bootstrap-fe11ac77a26ab321bb6648d557a15416bab1d74e.zip | |
Merge pull request #13390 from twbs/ie10-viewport-bug
add IE10 viewport bug workaround to examples
Diffstat (limited to 'docs/assets/js')
| -rw-r--r-- | docs/assets/js/_src/application.js | 14 | ||||
| -rw-r--r-- | docs/assets/js/ie10-viewport-bug-workaround.js | 21 |
2 files changed, 21 insertions, 14 deletions
diff --git a/docs/assets/js/_src/application.js b/docs/assets/js/_src/application.js index 2566298b8..08ca5f907 100644 --- a/docs/assets/js/_src/application.js +++ b/docs/assets/js/_src/application.js @@ -14,20 +14,6 @@ $(function () { - // IE10 viewport hack for Surface/desktop Windows 8 bug - // - // See Getting Started docs for more information - if (navigator.userAgent.match(/IEMobile\/10\.0/)) { - var msViewportStyle = document.createElement('style') - msViewportStyle.appendChild( - document.createTextNode( - '@-ms-viewport{width:auto!important}' - ) - ) - document.querySelector('head').appendChild(msViewportStyle) - } - - var $window = $(window) var $body = $(document.body) diff --git a/docs/assets/js/ie10-viewport-bug-workaround.js b/docs/assets/js/ie10-viewport-bug-workaround.js new file mode 100644 index 000000000..256a6a65a --- /dev/null +++ b/docs/assets/js/ie10-viewport-bug-workaround.js @@ -0,0 +1,21 @@ +/*! + * IE10 viewport hack for Surface/desktop Windows 8 bug + * Copyright 2014 Twitter, Inc. + * Licensed under the Creative Commons Attribution 3.0 Unported License. For + * details, see http://creativecommons.org/licenses/by/3.0/. + */ + +// See the Getting Started docs for more information: +// http://getbootstrap.com/getting-started/#support-ie10-width + +(function () { + if (navigator.userAgent.match(/IEMobile\/10\.0/)) { + var msViewportStyle = document.createElement('style') + msViewportStyle.appendChild( + document.createTextNode( + '@-ms-viewport{width:auto!important}' + ) + ) + document.querySelector('head').appendChild(msViewportStyle) + } +})(); |
