Skip to content

Instantly share code, notes, and snippets.

@apipkin
Forked from sidnei/node-detach.js
Created September 28, 2010 19:03
Show Gist options
  • Select an option

  • Save apipkin/601580 to your computer and use it in GitHub Desktop.

Select an option

Save apipkin/601580 to your computer and use it in GitHub Desktop.
YUI().use("event", "node", "node-event-simulate", function(Y){
var node = Y.one("#sidebar");
node.on("foo|click", function() {
console.log("clicked")
} );
node.simulate("click");
node.detach("foo|click");
node.simulate("click");
})
YUI().use("event", "node", "node-event-simulate", function(Y){
var nodes = Y.all("#sidebar");
var node = Y.one("#sidebar");
nodes.on("foo|click", function() {
console.log("clicked")
} );
node.simulate("click");
nodes.detach("foo|click");
node.simulate("click");
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment