Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to increment/decrements viewport meta values(initial scale, max scale or min scale) on every button click?
    primarykey
    data
    text
    <p>Im developing phonegap app in that I have used meta tag values through Javascript , I need a requirement to change meta tag values(initial scale, max scale or min scale) on button clicks. Its changing only one times after that does not work(change). I am running it in Android 4.0.4 devices and using Phonegap 2.9.0 Below is my Javascript code</p> <pre><code>$(document).ready(function() { alert("Onload"); }); var scale = 1.0; function zoomIn(){ scale++; if (screen.width &lt; 500) { $('#meta-viewport').attr('content', 'width=device-width, initial-scale=' + scale + ', maximum-scale=' + scale + ', minimum-scale=' + scale + ', user-scalable=yes'); } } function zoomOut() { scale--; if (screen.width &lt; 500) { $('#meta-viewport').attr('content', 'width=device-width, initial-scale=' + scale + ', maximum-scale=' + scale + ', minimum-scale=' + scale + ', user-scalable=yes'); } } </code></pre> <p>Below is my html code</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset="utf-8" /&gt; &lt;meta name="viewport" content="user-scalable=yes, initial-scale=1.0, maximum scale=1.0, minimum-scale=1.0,width=device-width, height=device-height,target-densitydpi=devicedpi" /&gt; &lt;script type="text/javascript" src="js/jquery_v1.9.1.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;img id="background" src="img/bgImg.png" style="position: absolute; z-index:-1;" /&gt; &lt;img id="carImg1" src="img/up.png" style="position: absolute; left: 150px; top: 100px; z-index:1;" /&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Please anybody help me to get resolve this..What am I doing wrong?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload