MCPcopy Create free account
hub / github.com/idank/explainshell / genFx

Function genFx

explainshell/web/static/js/jquery.js:9230–9248  ·  view source on GitHub ↗
( type, includeWidth )

Source from the content-addressed store, hash-verified

9228
9229// Generate parameters to create a standard animation
9230function genFx( type, includeWidth ) {
9231 var which,
9232 attrs = { height: type },
9233 i = 0;
9234
9235 // if we include width, step value is 1 to do all cssExpand values,
9236 // if we don't include width, step value is 2 to skip over Left and Right
9237 includeWidth = includeWidth? 1 : 0;
9238 for( ; i < 4 ; i += 2 - includeWidth ) {
9239 which = cssExpand[ i ];
9240 attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
9241 }
9242
9243 if ( includeWidth ) {
9244 attrs.opacity = attrs.width = type;
9245 }
9246
9247 return attrs;
9248}
9249
9250// Generate shortcuts for custom animations
9251jQuery.each({

Callers 1

jquery.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected