Skip to content

Instantly share code, notes, and snippets.

@Yuffster
Created April 15, 2012 02:33
Show Gist options
  • Select an option

  • Save Yuffster/2389442 to your computer and use it in GitHub Desktop.

Select an option

Save Yuffster/2389442 to your computer and use it in GitHub Desktop.
Eve.register('myAwesomePlugin', function() {
this.listen('a', 'click', function() {
console.log("You clicked on a link within my namespace!");
});
});
Eve.scope('#section-of-my-site', function() {
//This will attach the named module to the namespace of
//"#section-of-my-site .subsection".
this.attach('myAwesomePlugin', '.subsection');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment