Skip to content

Instantly share code, notes, and snippets.

@markevans
Created June 7, 2012 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save markevans/2888879 to your computer and use it in GitHub Desktop.
Save markevans/2888879 to your computer and use it in GitHub Desktop.
Example use of a view, using the class stuff
define(['view'], function(View){
return View.sub('ItemView', function(){
this.domEvent('click', 'button', 'selected')
})
})
///////////////////////////////////////////////////////
define([], function(){
// SAME EXAMPLE USING PLUGINS
})
@markevans
Copy link
Author

on button click, the view calls the "selected" method on its delegate.

@markevans
Copy link
Author

show me how to do it with plugins. show me! show me the money!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment