1

please help... I am creating a web application in which i need to set zoom level of browsers to default when it is less than 1... I had tried jquery resize() function that won't be helpfull to me because i m not getting how to get the window width in pixels any help will be appritiated... thanx...

var winWidth = $(window).width();
$(window).resize(function() { 
    if (winWidth>"1500")
    {
        //how can i pass the values again to the window width so dat it will reset to default
    }
});
vishal vasistha
  • 206
  • 3
  • 6
  • This is kind of a duplicate of the question [http://stackoverflow.com/questions/9441557/how-to-increase-browser-zoom-level-on-page-load](http://stackoverflow.com/questions/9441557/how-to-increase-browser-zoom-level-on-page-load). Note the reasons listed by the highest rated answer there as to why you shouldn't be doing this for the user. – Derek Oct 18 '13 at 21:14
  • thanx 4 the help sir.. – vishal vasistha Oct 18 '13 at 21:23

1 Answers1

1

For chrome and above;

transform: scale(2); 
    -webkit-transform: scale(2); 
    -webkit-transform-origin: 0 0; 
    -moz-transform: scale(2); 
    -moz-transform-origin: 0 0; 
    -o-transform: scale(2); 
    -o-transform-origin: 0 0; 
    -ms-transform: scale(2); 
    -ms-transform-origin: 0 0;

IE 7 and 8

zoom: 2;

example is here

3bu1
  • 977
  • 12
  • 30