Landing pull request 375. Added test case to support #9237 Fixes #9237.

More Details:
 - https://github.com/jquery/jquery/pull/375
 - http://bugs.jquery.com/ticket/9237
This commit is contained in:
avaly 2011-05-13 12:09:49 -04:00 committed by timmywil
parent 3486365062
commit cbbd7d28e1
2 changed files with 54 additions and 2 deletions

View file

@ -96,6 +96,8 @@ jQuery.extend({
// convert relative number strings (+= or -=) to relative numbers. #7345
if ( type === "string" && rrelNum.test( value ) ) {
value = +value.replace( rrelNumFilter, "" ) + parseFloat( jQuery.css( elem, name ) );
// Fixes bug #9237
type = 'number';
}
// If a number was passed in, add 'px' to the (except for certain CSS properties)