Added fix for non-standard CSS attributes in IE.

This commit is contained in:
John Resig 2006-08-24 23:10:54 +00:00
parent 8a1adfcd2a
commit 23e255015f

View file

@ -957,8 +957,8 @@ jQuery.extend({
if (!force && e.style[p])
r = e.style[p];
else if (e.currentStyle) {
p = p.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()});
r = e.currentStyle[p];
var np = p.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()});
r = e.currentStyle[p] || e.currentStyle[np];
} else if (document.defaultView && document.defaultView.getComputedStyle) {
p = p.replace(/([A-Z])/g,"-$1").toLowerCase();
var s = document.defaultView.getComputedStyle(e,"");