I have the following form that is not submitting when I click the html button that has a jQuery submit function attached to it's click event.
My html is below:
<form data-role="tocart-form" name="dynamicForm" id="dynamForm" action="http://www.example.com/dynamicbuy.php" method="post">
<input type="hidden" name="product" value="4">
<input type="hidden" name="uenc" value="aHR0c">
<input name="form_key" type="hidden" value="eG4oiXalmxVw4hDx">
<input name="price" type="hidden" value="">
<input type="button" name="submit" value="Buy" class="buttonBuy">
</form>
My jQuery is below:
$(".buttonBuy").click(function(){
$("input[name='price']").val($("#the-watchPrice > span").html());
$("#dynamForm").submit();
});