From 0a4dc3f8f295d10bbe855a11f52931c6c979e29e Mon Sep 17 00:00:00 2001 From: John Resig Date: Mon, 24 Jul 2006 03:56:46 +0000 Subject: [PATCH 1/1] Make sure that camel case is passed in to currentStyle. --- jquery/jquery.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jquery/jquery.js b/jquery/jquery.js index 4f26b4c..9aac295 100644 --- a/jquery/jquery.js +++ b/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; -- 1.7.10.4