forked from cytoscape/cytoscape.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Collection trigger
maxkfranz edited this page May 1, 2012
·
2 revisions
Trigger an event on a collection such that bound event handlers are triggered.
eventType : An event type string extraParameters : Extra parameters to pass to event handler functions for the event (either a single value or an array of values)
event : A jQuery event object
This function triggers the specified event for all elements in the collection, effectively calling all of the event handler functions bound to the elements for the corresponding event.
Trigger click with extra parameters:
cy.nodes().bind("click", function(eventObj, param1, param2){
console.log("Extra params: %s, %s", param1, param2);
}).trigger("click", [ "foo", "bar" ]);