mirror of
https://github.com/twbs/bootstrap.git
synced 2025-03-02 02:29:24 +01:00
make WP8 device-width hack code fully consistent between docs HTML & docs JS
This commit is contained in:
parent
20772462df
commit
b67cba2b4d
@ -18,14 +18,13 @@
|
|||||||
//
|
//
|
||||||
// See Getting Started docs for more information
|
// See Getting Started docs for more information
|
||||||
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
|
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
|
||||||
var msViewportStyle = document.createElement('style');
|
var msViewportStyle = document.createElement('style')
|
||||||
msViewportStyle.appendChild(
|
msViewportStyle.appendChild(
|
||||||
document.createTextNode(
|
document.createTextNode(
|
||||||
'@-ms-viewport{width:auto!important}'
|
'@-ms-viewport{width:auto!important}'
|
||||||
)
|
)
|
||||||
);
|
)
|
||||||
document.querySelector('head').
|
document.querySelector('head').appendChild(msViewportStyle)
|
||||||
appendChild(msViewportStyle);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -494,13 +494,13 @@ bootstrap/
|
|||||||
|
|
||||||
{% highlight js %}
|
{% highlight js %}
|
||||||
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
|
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
|
||||||
var msViewportStyle = document.createElement("style")
|
var msViewportStyle = document.createElement('style')
|
||||||
msViewportStyle.appendChild(
|
msViewportStyle.appendChild(
|
||||||
document.createTextNode(
|
document.createTextNode(
|
||||||
"@-ms-viewport{width:auto!important}"
|
'@-ms-viewport{width:auto!important}'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
document.querySelector("head").appendChild(msViewportStyle)
|
document.querySelector('head').appendChild(msViewportStyle)
|
||||||
}
|
}
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
<p>For more information and usage guidelines, read <a href="http://timkadlec.com/2013/01/windows-phone-8-and-device-width/">Windows Phone 8 and Device-Width</a>.</p>
|
<p>For more information and usage guidelines, read <a href="http://timkadlec.com/2013/01/windows-phone-8-and-device-width/">Windows Phone 8 and Device-Width</a>.</p>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user