clean up js example

This commit is contained in:
David Lord 2018-04-12 12:17:14 -07:00
parent 746b91dfce
commit 1e84c67beb
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
5 changed files with 10 additions and 8 deletions

View file

@ -13,7 +13,7 @@
ev.preventDefault();
$.ajax({
method: 'POST',
url: '{{ url_for('add') }}',
url: {{ url_for('add')|tojson }},
data: $(this).serialize()
}).done(addShow);
}
@ -22,6 +22,6 @@
$('#result').text(data.result);
}
$('form:first').on('submit', addSubmit);
$('#calc').on('submit', addSubmit);
</script>
{% endblock %}