MCPcopy Create free account
hub / github.com/frank-lam/fullstack-tutorial / genFx

Function genFx

notes/docsify/unpkg/gotop/jquery-2.1.0.js:6251–6269  ·  view source on GitHub ↗
( type, includeWidth )

Source from the content-addressed store, hash-verified

6249
6250// Generate parameters to create a standard animation
6251function genFx( type, includeWidth ) {
6252 var which,
6253 i = 0,
6254 attrs = { height: type };
6255
6256 // if we include width, step value is 1 to do all cssExpand values,
6257 // if we don't include width, step value is 2 to skip over Left and Right
6258 includeWidth = includeWidth ? 1 : 0;
6259 for ( ; i < 4 ; i += 2 - includeWidth ) {
6260 which = cssExpand[ i ];
6261 attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
6262 }
6263
6264 if ( includeWidth ) {
6265 attrs.opacity = attrs.width = type;
6266 }
6267
6268 return attrs;
6269}
6270
6271function createTween( value, prop, animation ) {
6272 var tween,

Callers 1

jquery-2.1.0.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected