Skip to content
Browse files

Added contents for update-cart event

  • Loading branch information...
1 parent 16e47db commit 2ae2c9d27b35f8e710e45caf45ed40859776afb4 @quirkey quirkey committed Jan 1, 2010
Showing with 8 additions and 1 deletion.
  1. +8 −1 javascripts/json_store.js
View
9 javascripts/json_store.js
@@ -51,7 +51,14 @@
});
this.bind('update-cart', function() {
-
+ var sum = 0;
+ $.each(this.session('cart') || {}, function(id, quantity) {
+ sum += quantity;
+ });
+ $('.cart-info')
+ .find('.cart-items').text(sum).end()
+ .animate({paddingTop: '30px'})
+ .animate({paddingTop: '10px'});
});
});

0 comments on commit 2ae2c9d

Please sign in to comment.
Something went wrong with that request. Please try again.