Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var DrinksView = Backbone.View.extend({
- el: '#menu',
- events: {
- 'click .drink-item': function(evt) {
- console.log("*** CLICKED TO GET DRINK ***")
- evt.preventDefault();
- evt.stopPropagation();
- var url = "";
- url += $(evt.currentTarget).attr('href') + "/" + new Date().getTime().toString();
- if(this.isFavorites)
- url += "?isFavorite=true&favoriteId=" + $(evt.currentTarget).data().drinkId;
- app.router.navigate(url, true);
- }
- },
- close : function(){
- this.remove(); // removes view from dom
- this.unbind(); // unbinds all the events associated with the view
- },
Add Comment
Please, Sign In to add comment