Issue with jQuery and Gravity form

Having a little trouble with some jQuery & Gravity Forms.

I added some Jquery to it to add a plus and minus button to increase and decrease the value in a number field but when I submit the form it just resets the form and the problem seems to lie within that script for the number functionality.

$(".ginput_container_number").append('<div class="inc button">+</div><div class="dec button">-</div>');
var $button=$(this);
var oldValue=$button.parent().find("input").val();
var newVal=parseFloat(oldValue)+1;

} else {
var newVal=parseFloat(oldValue)-1;
} else {

You can find the form here:

and the script is at