Adding meta tag in Head not working for Window Phone

113 Views Asked by At

i have a simple javascript code that is responsible for adding meta tag in the head.. it works fine for Iphone, however is not working for the window phone. any help

<html>
<head>

    <title>Hi there</title>
    <script type="text/javascript" src="jquery.js"></script>
    <script>
        (function () {
            if ( navigator.userAgent.match(/IEMobile\/10\.0/)) {
                $("head").append('<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no" />');
                alert("done");
            }
        })();
    </script>
</head>
<body>
    <div style="width:100%; height:100px; background:green; color:white;">
        Hi this is just the sample
    </div>
</body>


</html>
0

There are 0 best solutions below