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:
5ebd5f6
)
Fix for #812
author
Jörn Zaefferer
<joern.zaefferer@gmail.com>
Tue, 16 Jan 2007 14:19:01 +0000
(14:19 +0000)
committer
Jörn Zaefferer
<joern.zaefferer@gmail.com>
Tue, 16 Jan 2007 14:19:01 +0000
(14:19 +0000)
src/jquery/jquery.js
patch
|
blob
|
history
diff --git
a/src/jquery/jquery.js
b/src/jquery/jquery.js
index
f986d28
..
0b0972e
100644
(file)
--- a/
src/jquery/jquery.js
+++ b/
src/jquery/jquery.js
@@
-441,7
+441,7
@@
jQuery.fn = jQuery.prototype = {
for ( var prop in obj )
jQuery.attr(
type ? this.style : this,
for ( var prop in obj )
jQuery.attr(
type ? this.style : this,
- prop, jQuery.prop(this, obj[prop], type, index)
+ prop, jQuery.prop(this, obj[prop], type, index, prop)
);
});
},
);
});
},
@@
-1262,13
+1262,16
@@
jQuery.extend({
return obj;
},
return obj;
},
- prop: function(elem, value, type, index){
+ prop: function(elem, value, type, index, prop){
// Handle executable functions
if ( jQuery.isFunction( value ) )
return value.call( elem, [index] );
// Handle executable functions
if ( jQuery.isFunction( value ) )
return value.call( elem, [index] );
+
+ // exclude the following css properties to add px
+ var exclude = /z-?index|font-?weight|opacity/i;
// Handle passing in a number to a CSS property
// Handle passing in a number to a CSS property
- if ( value.constructor == Number && type == "curCSS" )
+ if ( value.constructor == Number && type == "curCSS" && !exclude.test(prop) )
return value + "px";
return value;
return value + "px";
return value;