/ Published in: JavaScript
Learn how to test for CSS property support in specific browsers using this simple Javascript technique.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var el = document.createElement("div"); if(typeof el.style.opacity == "string") { //Your browser supports the CSS Opacity property"; } else if (typeof el.style.filter == "string"){ //Your browser doesn't support the CSS Opacity property but does support IE filters"; } else { //"Your browser doesn't support the CSS Opacity property"; }
URL: http://www.nealgrosskopf.com/tech/thread.php?pid=74