Last active
December 18, 2015 14:39
-
-
Save dspangen/5799167 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var PageableViewMixin { | |
events: { | |
"click a.nextPage": "nextPage", | |
"click a.prevPage": "prevPage" | |
}, | |
nextPage: function(e) { | |
// paging logic | |
}, | |
prevPage: function(e) { | |
// paging logic | |
} | |
}; | |
var ProductListView = Backbone.View.extend({ | |
events: { | |
"click a.productLink": "onProductClick" | |
}, | |
function(e) { | |
// logic for clicking on a product | |
} | |
}); | |
Cocktail.mixin(View, PageableViewMixin); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment