Hi,
i have a problem
the website for ipad and iphone is 900px width.
i made an js function to size the div between 300x400 to 'fullscreen' triggered by the fullscreen button.
but the viewport tag in the index says device-width
when i change that to 900 and when i make it possible to zoom by changing the initial-scale=1, minimum-scale=1.0, maximum-scale=1.0"
to something else then the pano goes to 100% of that 900px width and not just fullscreen.
ofcourse i mean with fullscreen on iPad full brouwser screen.
(we are talking tablet and mobile here..
So is there a substitution for this js code so it works nice, also with different viewport settings?
<script type="text/javascript" language="javascript">
function fun() {
var div1 = document.getElementById("pano");
if (div1.style.width != "100%") {
mt = div1.style.marginTop;
ml = div1.style.marginLeft;
w = div1.style.width;
h = div1.style.height;
document.getElementById("pano").style.marginTop = "0px";
document.getElementById("pano").style.marginLeft = "0px";
div1.style.width = "100%";
div1.style.height = "100%";
}
else
{
div1.style.width = w;
div1.style.height = h;
div1.style.marginTop = "0px";
div1.style.marginLeft = "0px";
document.getElementById("pano").style.marginTop = "475px";
document.getElementById("pano").style.marginLeft = "180px";
}
return false;
}
</script>
Alles anzeigen
i hope there is an solution for this.
i tried some stuff to build in the function like:
if (uagent.search("iphone") > -1)
DO THE ABOVE FUNCTION BUT DIFFERENT
else
DO THE ABOVE FUNCTION
can't get it.
Any wizzkid here?
Cheers
Tuur