Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Save a few bytes, thanks @danheberden!

  • Loading branch information...
commit 727d51ec9df1dadd742fc468ca3e003da172fb1b 1 parent 0153287
@dmethvin dmethvin authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/css.js
View
4 src/css.js
@@ -6,7 +6,7 @@ var ralpha = /alpha\([^)]*\)/i,
rupper = /([A-Z]|^ms)/g,
rnumpx = /^-?\d+(?:px)?$/i,
rnum = /^-?\d/,
- rrelNum = /^([+\-])=([+\-\.\de]+)/,
+ rrelNum = /^([-+])=([-+.\de]+)/,
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
cssWidth = [ "Left", "Right" ],
@@ -85,7 +85,7 @@ jQuery.extend({
// convert relative number strings (+= or -=) to relative numbers. #7345
if ( type === "string" && (ret = rrelNum.exec( value )) ) {
- value = (ret[1] === "+"? +ret[2] : -ret[2]) + parseFloat( jQuery.css( elem, name ) );
+ value = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) );
// Fixes bug #9237
type = "number";
}
Please sign in to comment.
Something went wrong with that request. Please try again.