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

Function genFx

2.0.3/Animation.js:606–626  ·  view source on GitHub ↗
(type, includeWidth)

Source from the content-addressed store, hash-verified

604// Generate parameters to create a standard animation
605
606function genFx(type, includeWidth) {
607 var which,
608 attrs = {
609 height: type
610 },
611 i = 0;
612
613 // if we include width, step value is 1 to do all cssExpand values,
614 // if we don't include width, step value is 2 to skip over Left and Right
615 includeWidth = includeWidth ? 1 : 0;
616 for (; i < 4; i += 2 - includeWidth) {
617 which = cssExpand[i];
618 attrs["margin" + which] = attrs["padding" + which] = type;
619 }
620
621 if (includeWidth) {
622 attrs.opacity = attrs.width = type;
623 }
624
625 return attrs;
626}
627
628// Generate shortcuts for custom animations
629jQuery.each({

Callers 1

Animation.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected