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

Function setPositiveNumber

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

Source from the content-addressed store, hash-verified

5731}
5732
5733function setPositiveNumber( elem, value, subtract ) {
5734 var matches = rnumsplit.exec( value );
5735 return matches ?
5736 // Guard against undefined "subtract", e.g., when used as in cssHooks
5737 Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
5738 value;
5739}
5740
5741function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
5742 var i = extra === ( isBorderBox ? "border" : "content" ) ?

Callers 1

jquery-2.1.1.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected