Skip to content

Instantly share code, notes, and snippets.

@drinkspiller
Last active December 17, 2015 00:38
Show Gist options
  • Save drinkspiller/5521998 to your computer and use it in GitHub Desktop.
Save drinkspiller/5521998 to your computer and use it in GitHub Desktop.
$("input[type=button].mais").click(function() {
$(this).prev().val(parseFloat($(this).prev().val()) + 1);
console.log("Sending ID: " + $(this).attr('id'));
var data = {id: $(this).attr('id'),
quantidade: 1};
$.ajax({
type: 'POST',
url: 'http://127.0.0.1/Conveniencia/session/add',
data: data
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment