Sha256: 448ec30483ceac18fef6ebf8064f247395f28d16a926a68642181a3d1594b169
Contents?: true
Size: 518 Bytes
Versions: 6
Compression:
Stored size: 518 Bytes
Contents
$(document).ready(function() { $.each($('td.qty input'), function(i, input) { $(input).on('change', function() { var id = "#" + $(this).attr('id').replace("_quantity", "_id"); console.log($(this)) console.log($(id)) jQuery.post("/admin/orders/" + $('input#order_number').val() + "/line_items/" + $(id).val(), { _method: "put", "line_item[quantity]": $(this).val()}, function(resp) { $('#order-form-wrapper').html(resp.responseText); }) }) }) });
Version data entries
6 entries across 6 versions & 1 rubygems