Skip to content

Instantly share code, notes, and snippets.

@zxqx
Created April 4, 2014 18:13
Show Gist options
  • Save zxqx/9980138 to your computer and use it in GitHub Desktop.
Save zxqx/9980138 to your computer and use it in GitHub Desktop.
// in the listening view (could be HeroWidgetContainer.js or any view)
// 'someView' could be DashboardView, Footprint, or any View obj
this.listenTo(someView, 'walkthroughEvent1', this.startWalkthrough);
// in someView (that will be emitting events)
this.trigger('walkthroughEvent1');
// if you need to stop listening to an obj's event
this.stopListening(someView, 'walkthroughEvent1');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment