XmlAspect.org/Xml4jQuery/api/$on

From ApiFusion
Jump to: navigation, search

.$on

Makes the query call chain to asynchronous. The chain execution will continue only when the event is triggered.

$(...).$on( eventName ).toggleClass('toggled')
$(...).$on( eventName ).$then( callback ).toggleClass('toggled')

Arguments

  1. eventName/* :string, same as in jQuery <b>[http://api.jquery.com/on/ .on()]</b> method. */
    
  2. callback /* :function, invoked before the chain continues. Optional. */
    

Return

The promises chain shimmed the jQuery and Xml4jQuery methods.

Notes

The first callback argument is an Event object. Like the MouseEvent in click

Remaining callback arguments also same as in $then().