Commit 0a4dc3f8 authored by John Resig's avatar John Resig

Make sure that camel case is passed in to currentStyle.

parent 9e37da96
...@@ -1187,9 +1187,10 @@ jQuery.extend({ ...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment