html - Javascript to automatically zoom in with a browser on load -
i have created java application 500x400 px iphones width greater 400px, after site loads need manually zoom application. there javascript automatically zoom window width of screen being displayed 400px, secondly there way disable scrolling :) thank much!
check out css3 media queries. allow include stylesheets depending on browser's viewport's size. , disable scrolling u set scroll hidden.
code disable scroll.
$('html, body').css({ 'overflow': 'hidden', 'height': '100%' })
also using js u detect platform u r rendering application , use zoom zoom in accordingly.
example mozilla:
if ($.browser.mozilla){ var step = 0.02; currffzoom += step; $('body').css('moztransform','scale(' + currffzoom + ')'); } else { var step = 2; curriezoom += step; $('body').css('zoom', ' ' + curriezoom + '%'); }
Comments
Post a Comment