I\'m displaying a element on my site which I rotate with -90deg but if a browser doesn\'t support the CSS transform the element looks misspositioned and not really good. Now I w
This is about as simple as you get and a jsfiddle. It no longer goes on an infinite loop.
function getSupportedTransform() {
var prefixes = 'transform WebkitTransform MozTransform OTransform msTransform'.split(' ');
for(var i = 0; i < prefixes.length; i++) {
if(document.createElement('div').style[prefixes[i]] !== undefined) {
return prefixes[i];
}
}
return false;
}