How can I check if the browser supports the Zoom css atribute? I know from Caniuse.com that only Firefoz does not support it, so, from this question (In Javascript, how do I determine if my current browser is Firefox on a computer vs everything else?) I tried:
if ($.browser.mozilla) { ...
which returns me an error in chrome:
Cannot read property 'mozilla' of undefined
Another solution according to the answer is detectinf if the browser supports that function, how could I do that?
Here is how you could detect support for a CSS feature in plain JavaScript. (Replace zoom with whatever feature is needed.)
document.createElement("detect").style.zoom === ""
I think this answer should help you : jquery determine if css zoom is available in browser
The best way is to use a JS library dedicated to test browser CSS capabilities like Modernizr does.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With