Skip to content

Instantly share code, notes, and snippets.

@billsaysthis
Created April 9, 2012 21:28
Show Gist options
  • Save billsaysthis/2346669 to your computer and use it in GitHub Desktop.
Save billsaysthis/2346669 to your computer and use it in GitHub Desktop.
Backbone with TB2 modal sample View class
ZPCommon.Views.SocialSharesView = Backbone.View.extend({
template: 'public/common/socialShares_hb',
id: 'socialShares',
className: 'buttonBox',
initialize: function() {
_.bindAll(this, 'emailShare');
},
events: {
'click #emailShareBtn': 'emailShare'
},
emailShare: function(e) {
e.preventDefault();
$('#emailShareModal').modal('show');
}
});
@billsaysthis
Copy link
Author

Bill, I figured it out. Hard to say what I was doing wrong but mainly because I'm still learning how Backbone fires and responds to events in Views. Thanks for chiming in.

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