Improved jQuery.prop to handle "px" on computed values

This commit is contained in:
Jörn Zaefferer 2007-02-13 22:41:58 +00:00
parent 48c16eb85b
commit 339789a931

View file

@ -1280,7 +1280,7 @@ jQuery.extend({
prop: function(elem, value, type, index, prop){
// Handle executable functions
if ( jQuery.isFunction( value ) )
return value.call( elem, [index] );
value = value.call( elem, [index] );
// exclude the following css properties to add px
var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i;