git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9e37da9
)
Make sure that camel case is passed in to currentStyle.
author
John Resig
<jeresig@gmail.com>
Mon, 24 Jul 2006 03:56:46 +0000
(
03:56
+0000)
committer
John Resig
<jeresig@gmail.com>
Mon, 24 Jul 2006 03:56:46 +0000
(
03:56
+0000)
jquery/jquery.js
patch
|
blob
|
history
diff --git
a/jquery/jquery.js
b/jquery/jquery.js
index
4f26b4c
..
9aac295
100644
(file)
--- a/
jquery/jquery.js
+++ b/
jquery/jquery.js
@@
-1187,9
+1187,10
@@
jQuery.extend({
if (!force && e.style[p])
r = e.style[p];
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];
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;
p = p.replace(/([A-Z])/g,"-$1").toLowerCase();
var s = document.defaultView.getComputedStyle(e,"");
r = s ? s.getPropertyValue(p) : null;