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

Function setPositiveNumber

2.1.1/test/other.js:3140–3146  ·  view source on GitHub ↗
( elem, value, subtract )

Source from the content-addressed store, hash-verified

3138}
3139
3140function setPositiveNumber( elem, value, subtract ) {
3141 var matches = rnumsplit.exec( value );
3142 return matches ?
3143 // Guard against undefined "subtract", e.g., when used as in cssHooks
3144 Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
3145 value;
3146}
3147
3148function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
3149 var i = extra === ( isBorderBox ? "border" : "content" ) ?

Callers 1

other.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected