Skip to content

Commit

Permalink
Update index.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobstr committed Apr 19, 2013
1 parent dd91a67 commit d1884cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ Example Javascript Code
jQuery('#notification_area').text(ajaxEvent.payload);
});
// Update a shopping cart cart.
// Update a shopping cart.
jQuery(document).bind('CartUpdate.django', function(ajaxEvent){
// <ul id="cart"><li id="product_id-1">Cool Product<span class="qty"></span></li></ul>
// ajaxEvent.payload.newQty is an integer
jQuery('#cart').find('#product_id-'+product_id).find('.qty').val(ajaxEvent.payload.newQty);
});
// You can bind multiple events to teh same response.
// You can bind multiple events to the same response.
jQuery(document).bind('CartUpdate.django',function(ajaxEvent){
// <div id="total_value">$<span class="value"></span></div>
// ajaxEvent.payload.value is an integer
Expand Down

0 comments on commit d1884cc

Please sign in to comment.