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

Function genFx

2.1.1/test/other.js:3707–3725  ·  view source on GitHub ↗
( type, includeWidth )

Source from the content-addressed store, hash-verified

3705
3706// Generate parameters to create a standard animation
3707function genFx( type, includeWidth ) {
3708 var which,
3709 i = 0,
3710 attrs = { height: type };
3711
3712 // if we include width, step value is 1 to do all cssExpand values,
3713 // if we don't include width, step value is 2 to skip over Left and Right
3714 includeWidth = includeWidth ? 1 : 0;
3715 for ( ; i < 4 ; i += 2 - includeWidth ) {
3716 which = cssExpand[ i ];
3717 attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
3718 }
3719
3720 if ( includeWidth ) {
3721 attrs.opacity = attrs.width = type;
3722 }
3723
3724 return attrs;
3725}
3726
3727function createTween( value, prop, animation ) {
3728 var tween,

Callers 1

other.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected