MCPcopy Index your code
hub / github.com/JsAaron/jQuery / setPositiveNumber

Function setPositiveNumber

2.1.1/src/css.js:61–67  ·  view source on GitHub ↗
( elem, value, subtract )

Source from the content-addressed store, hash-verified

59}
60
61function setPositiveNumber( elem, value, subtract ) {
62 var matches = rnumsplit.exec( value );
63 return matches ?
64 // Guard against undefined "subtract", e.g., when used as in cssHooks
65 Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
66 value;
67}
68
69function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
70 var i = extra === ( isBorderBox ? "border" : "content" ) ?

Callers 1

css.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected