Forum



21:26

21/08/2012

I am trying to develop a version of my jqGrid that hides all but two columns, and then fills up the screen of my iPhone.
I tried the following:
$(window).bind('resize', function() {
$("#list").setGridWidth($(window).width());
}).trigger('resize');
and it basically expanded the column widths of the two visible columns...What I really want it to do is keep the same width, but auto-zoom in to fill the phone's screen width so the user doesn't have to zoom in.
Is there a way to do this on iPhone and Android in my javascript code?
22:13

21/08/2012

Found a solution using a meta tag...works on my iPhone, and hopefully it works on my Android phone:
I put this line at the end of my Head section:
<meta name="viewport" id="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=10.0,initial-scale=1.0" />
With a little tweaking I have a grid with two columns that "auto-zooms" to fit the phone.
Most Users Ever Online: 715
Currently Online:
47 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66