Class: Toggler {#Toggler}

Attaches an event handler to an element to toggle a tween transition of an element.

Demo

Demo

Extends:

Fx.Tween.Toggle

Toggler Method: constructor {#Toggler:constructor}

Syntax:

var myToggler = new Toggler(element, toggler, options);

Arguments:

  1. element - (mixed) An Element or the string id of an Element to apply the transition to.
  2. toggler - (mixed) An Element or the string id of an Element to attach the toggle event to.
  3. options - (object) The Fx.Tween.toggle options object, plus the options described below:

Options:

Toggler Method: attach {#Toggler:attach}

Syntax:

myToggler.attach():

Returns:

This Toggler Instance.

Toggler Method: detach {#Toggler:detach}

Syntax:

myToggler.detach():

Returns:

This Toggler Instance.