4

In the browser by default the user can either use ctrl +/- or ctrl scroll to zoom in or zoom out the page. I would like to know is there any way to check the zoom level is below 100% and not doing something

eg. My code

$(window).resize(function() {
    if ($(window).height() > 500 && $(window).width() > 600 && $('.royalSlider:visible').length < 1 && !isiPhone()){

        //Not allow the page size < 0
        Book.zoom_auto();
        Book.book_position();
        Book.dragdrop_init();   

        if ($(".viewportBinder").length){                   
                $("#view").css('height',$(window).height());
                $("#view").css('width',$(window).width());  
                content = element.viewport('update');     
        }
    }
calculate_zoom_factor();
});

currently window resize is implement some function but I would like to add condition only zoom level >= 100% , thanks

user782104
  • 13,233
  • 55
  • 172
  • 312

1 Answers1

2

Check the window size using this reference

From the website, you can find that the zoom level is below 100% if

$(window).width() >= screen.width
Jeff Noel
  • 7,500
  • 4
  • 40
  • 66
user782104
  • 13,233
  • 55
  • 172
  • 312