49
rated 0 times
[
53]
[
4]
/ answers: 1 / hits: 34846
/ 11 Years ago, wed, october 2, 2013, 12:00:00
I found this getComputedStyle polyfill in a JavaScript plugin
if (!computed) {
window.getComputedStyle = function(el) {
this.el = el;
this.getPropertyValue = function(prop) {
var re = /(-([a-z]){1})/g;
if (prop === float) {
prop = styleFloat;
}
if (re.test(prop)) {
prop = prop.replace(re, function () {
return arguments[2].toUpperCase();
});
}
return el.currentStyle[prop] ? el.currentStyle[prop] : null;
};
return this;
};
}
Is there any jQuery equivalent for getcomputedstyle();
More From » jquery