Shared Flashcard Set

Details

Jquery
Jquery Daily
4
Other
Professional
12/08/2012

Additional Other Flashcards

 


 

Cards

Term
varevent= jQuery.Event("logged");
event.user ="foo";
event.pass="bar";
$
("body").trigger(event);
Definition

trigger()

To pass arbitrary data through an event object

Term
$("p").click(function(event, a, b){
// when a normal click fires, a and b are undefined
// for a trigger like below a refers to "foo" and b refers to "bar"

}).trigger("click",["foo","bar"]);
Definition

Trigger()

 To pass arbitrary data to an event:

Supporting users have an ad free experience!