I don't have access to the HTML file to get to it from the server side, however I can add additional HTML to the site. MY question is I have a non responsive site listed below, that now because of the new viewport code, I have to ZOOM IN once the site loads, to see the entire site.
WEBSITE
I was trying this, but to no avail.
<script type="text/javascript">
$('head').remove('<meta name="viewport" content="initial-scale=1.0, width=device-width" />');
$("head").append('<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />');
</script>
A perfect situation would be to block or remove the viewport, and have the site load as a non responsive website as it was before.
Thanks!
I don't have access to the HTML file to get to it from the server side, however I can add additional HTML to the site. MY question is I have a non responsive site listed below, that now because of the new viewport code, I have to ZOOM IN once the site loads, to see the entire site.
WEBSITE http://www56.myfantasyleague./2017/home/51277
I was trying this, but to no avail.
<script type="text/javascript">
$('head').remove('<meta name="viewport" content="initial-scale=1.0, width=device-width" />');
$("head").append('<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />');
</script>
A perfect situation would be to block or remove the viewport, and have the site load as a non responsive website as it was before.
Thanks!
Share Improve this question asked Feb 18, 2017 at 0:45 DA-G-GURUDA-G-GURU 1411 gold badge3 silver badges12 bronze badges 1- Did you find an answer? – shinil Commented May 11, 2018 at 12:35
2 Answers
Reset to default 4Or you can just try this (Don't need jQuery):
document.getElementsByTagName('meta')['viewport'].content='initial-scale=1.0, user-scalable=no';
The argument to .remove()
must be a selector, not an HTML string.
$("head meta[name=viewport]:contains(initial-scale=1.0, width=device-width)").remove();