mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Make sure that camel case is passed in to currentStyle.
This commit is contained in:
parent
9e37da96d1
commit
0a4dc3f8f2
5
jquery/jquery.js
vendored
5
jquery/jquery.js
vendored
@ -1187,9 +1187,10 @@ jQuery.extend({
|
|||||||
|
|
||||||
if (!force && e.style[p])
|
if (!force && e.style[p])
|
||||||
r = 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];
|
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();
|
p = p.replace(/([A-Z])/g,"-$1").toLowerCase();
|
||||||
var s = document.defaultView.getComputedStyle(e,"");
|
var s = document.defaultView.getComputedStyle(e,"");
|
||||||
r = s ? s.getPropertyValue(p) : null;
|
r = s ? s.getPropertyValue(p) : null;
|
||||||
|
Loading…
Reference in New Issue
Block a user