dojo/fx.Toggler (version 1.10)

Summary

A simple dojo.Animation toggler API.

class constructor for an animation toggler. It accepts a packed set of arguments about what type of animation to use in each direction, duration, etc. All available members are mixed into these animations from the constructor (for example, node, showDuration, hideDuration).

Usage

var foo = new fx.Toggler(args);
dojo/fx/Toggler
Parameter Type Description
args undefined

Examples

Example 1

var t = new dojo/fx/Toggler({
    node: "nodeId",
    showDuration: 500,
    // hideDuration will default to "200"
    showFunc: dojo/fx/wipeIn,
    // hideFunc will default to "fadeOut"
});
t.show(100); // delay showing for 100ms
// ...time passes...
t.hide();

Property Summary

Method Summary

  • hide(delay) Toggle the node to hidden
  • hideFunc(args) The function that returns the dojo.Animation to hide the node
  • show(delay) Toggle the node to showing
  • showFunc(args) The function that returns the dojo.Animation to show the node

Properties

_hideAnim
Defined by: dojo/fx/Toggler
_hideArgs
Defined by: dojo/fx/Toggler
_isHiding
Defined by: dojo/fx/Toggler
_isShowing
Defined by: dojo/fx/Toggler
_showAnim
Defined by: dojo/fx/Toggler
_showArgs
Defined by: dojo/fx/Toggler
hideDuration
Defined by: dojo/fx/Toggler

Time in milliseconds to run the hide Animation

node
Defined by: dojo/fx/Toggler

the node to target for the showing and hiding animations

showDuration
Defined by: dojo/fx/Toggler

Time in milliseconds to run the show Animation

Methods

hide(delay)
Defined by dojo/fx/Toggler

Toggle the node to hidden

Parameter Type Description
delay Integer
Optional

Amount of time to stall playing the hide animation

Returns:undefined
hideFunc(args)
Defined by dojo/fx/Toggler

The function that returns the dojo.Animation to hide the node

Parameter Type Description
args Object

An object with the following properties:

  • node (DOMNode|String):

    The node referenced in the animation

  • duration (Integer, optional):

    Duration of the animation in milliseconds.

  • easing (Function, optional):

    An easing function.

Returns:undefined
show(delay)
Defined by dojo/fx/Toggler

Toggle the node to showing

Parameter Type Description
delay Integer
Optional

Amount of time to stall playing the show animation

Returns:undefined
showFunc(args)
Defined by dojo/fx/Toggler

The function that returns the dojo.Animation to show the node

Parameter Type Description
args Object

An object with the following properties:

  • node (DOMNode|String):

    The node referenced in the animation

  • duration (Integer, optional):

    Duration of the animation in milliseconds.

  • easing (Function, optional):

    An easing function.

Returns:undefined
Error in the documentation? Can’t find what you are looking for? Let us know!