Skip to content

Instantly share code, notes, and snippets.

@dspangen
Last active December 18, 2015 14:39
Show Gist options
  • Save dspangen/5799167 to your computer and use it in GitHub Desktop.
Save dspangen/5799167 to your computer and use it in GitHub Desktop.
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