[Answer]-Javascript to extract siblings, then send data to django

1👍

var newFood = [];

$('#order_table td.food_name').filter(function() {
    return $(this).data('status') == 'new';
}).each(function() {
    newFood.push( [$(this).text(), $(this).siblings('.quantity').text(), $(this).siblings('.price').text()] );
});

$.ajax({
    // do you ajax
});
👤Alex

Leave a comment