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
  • 12,597
  • 53
  • 165
  • 300

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,342
  • 4
  • 38
  • 65
user782104
  • 12,597
  • 53
  • 165
  • 300