Skip to content

Instantly share code, notes, and snippets.

@onestepcreative
Created January 30, 2014 00:28
Show Gist options
  • Save onestepcreative/8700217 to your computer and use it in GitHub Desktop.
Save onestepcreative/8700217 to your computer and use it in GitHub Desktop.
// Define class to hold all cart drop related items
cartDrop: {
// Initialize the cart bindings, or whatever
init: function() { ... },
events: {
bind: function() {
// sample: $(cart-trigger).on(click, BERG.cartDrop.events.open);
},
open: function() {
// use $(window).trigger('open.cart'); at end of function
},
close: function() {
// use $(window).trigger('close.cart'); at end of function
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment