Skip to content
Permalink
Browse files
Make sure that camel case is passed in to currentStyle.
  • Loading branch information
jeresig committed Jul 24, 2006
1 parent 9e37da9 commit 0a4dc3f8f295d10bbe855a11f52931c6c979e29e
Showing with 3 additions and 2 deletions.
  1. +3 −2 jquery/jquery.js
@@ -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;

0 comments on commit 0a4dc3f

Please sign in to comment.