Make sure that camel case is passed in to currentStyle.
This commit is contained in:
parent
9e37da96d1
commit
0a4dc3f8f2
1 changed files with 3 additions and 2 deletions
5
jquery/jquery.js
vendored
5
jquery/jquery.js
vendored
|
@ -1187,9 +1187,10 @@ jQuery.extend({
|
|||
|
||||
if (!force && e.style[p])
|
||||
r = e.style[p];
|
||||
else if (e.currentStyle)
|
||||
else if (e.currentStyle) {
|
||||
p = p.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()});
|
||||
r = e.currentStyle[p];
|
||||
else if (document.defaultView && document.defaultView.getComputedStyle) {
|
||||
} else if (document.defaultView && document.defaultView.getComputedStyle) {
|
||||
p = p.replace(/([A-Z])/g,"-$1").toLowerCase();
|
||||
var s = document.defaultView.getComputedStyle(e,"");
|
||||
r = s ? s.getPropertyValue(p) : null;
|
||||
|
|
Loading…
Reference in a new issue