Guest User

Untitled

a guest
Mar 17th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. <div class="col-md-4">
  2. <b class="net_total" style="font-size:20px;"> </b>
  3. </div>
  4.  
  5. var net_total = 0;
  6. $('.qty').each(function() {
  7. var row = $(this).parent().parent();
  8. var price = row.find('.price').val();
  9. var total = price * $(this).val() - 0;
  10. row.find('.total').val(total);
  11. });
  12. $('.total').each(function() {
  13. net_total += ($(this).val() - 0);
  14. });
  15. $.ajax({
  16. url:test.php,
  17. type:'POST',
  18. data: {net_total: net_total},
  19. success: function(){
  20. $('.net_total').html("Total : $ " + net_total);
  21. },
  22. });
  23. }
Add Comment
Please, Sign In to add comment