Skip to content

Instantly share code, notes, and snippets.

@DenisBY
Created November 12, 2013 14:12
Show Gist options
  • Save DenisBY/7431458 to your computer and use it in GitHub Desktop.
Save DenisBY/7431458 to your computer and use it in GitHub Desktop.
(function() {
$(document).ready(function() {
// $("#new_water_info").validate();
return $(".table-change-data input[type='number']").change(function() {
var root, val;
val = $(this).val();
root = $(this).closest("td");
return root.next().text(val - parseInt(root.prev().text()));
});
});
}).call(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment