Jquery determines if css scaling is available in browser

$(button).click(function(){
    if (Modernizr.zoom()) $('body').animate({ zoom: '200%'; }, 1000);
    else $('body').alternative();
});

As you can see above ... I want to increase my page by click.

By the way: is it good to use 'zoom' (css)? I am not sure because I did not find a good description for 'zoom' (css). Or is it better to use scale (css) for animation?

The main question is: is there a way to determine if the browser supports this css -zoom function (or something else)? I use Modernizr, but there is nothing in Modernizr to detect if zoom is available.

0
source share
2 answers

OK. , css zoom-property , IE "" . , , , , .

css3 scale-property! Modernizr.csstransforms() ( js)!

... !

+1

- ...

modernzr, ,

  if (Modernizr.testProp('zoom') === true) {
    someStuff()
  }

transform? -, - , transform - , , zoom, .

firefox , , , transform.

if (Modernizr.testProp('zoom') === true) {
  zoomWithCSS()
}
else {  
 zoomWithTransformScale()
}

codepen.

+2

All Articles