// ========================= getStyleProperty by kangax =============================== var getStyleProperty = (function(){ var prefixes = ['Moz', 'Webkit', 'Khtml', 'O', 'Ms']; var _cache = { }; function getStyleProperty(propName, element) { element = element || document.documentElement; var style = element.style, prefixed, uPropName; // check cache only when no element is given if (arguments.length == 1 && typeof _cache[propName] == 'string') { return _cache[propName]; } // test standard property first if (typeof style[propName] == 'string') { return (_cache[propName] = propName); } // console.log('getting prop', propName) // capitalize uPropName = propName.charAt(0).toUpperCase() + propName.slice(1); // test vendor specific properties for (var i=0, l=prefixes.length; i element. docElement.className += ' ' + classes.join( ' ' ); window.Modernizr = miniModernizr; }