clean up js example

This commit is contained in:
David Lord 2018-04-12 12:17:14 -07:00
parent 81ad82cc9a
commit 84e9ff3853
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 %}