MCPcopy Create free account
hub / github.com/JsAaron/jQuery / setPositiveNumber

Function setPositiveNumber

2.1.1/test/jquery-1.11.1.js:6508–6514  ·  view source on GitHub ↗
( elem, value, subtract )

Source from the content-addressed store, hash-verified

6506}
6507
6508function setPositiveNumber( elem, value, subtract ) {
6509 var matches = rnumsplit.exec( value );
6510 return matches ?
6511 // Guard against undefined "subtract", e.g., when used as in cssHooks
6512 Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
6513 value;
6514}
6515
6516function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
6517 var i = extra === ( isBorderBox ? "border" : "content" ) ?

Callers 1

jquery-1.11.1.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected