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

Function genFx

2.1.1/src/effects.js:90–108  ·  view source on GitHub ↗
( type, includeWidth )

Source from the content-addressed store, hash-verified

88
89// Generate parameters to create a standard animation
90function genFx( type, includeWidth ) {
91 var which,
92 i = 0,
93 attrs = { height: type };
94
95 // If we include width, step value is 1 to do all cssExpand values,
96 // otherwise step value is 2 to skip over Left and Right
97 includeWidth = includeWidth ? 1 : 0;
98 for ( ; i < 4 ; i += 2 - includeWidth ) {
99 which = cssExpand[ i ];
100 attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
101 }
102
103 if ( includeWidth ) {
104 attrs.opacity = attrs.width = type;
105 }
106
107 return attrs;
108}
109
110function createTween( value, prop, animation ) {
111 var tween,

Callers 1

effects.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected