I would like to send a form
without clicking the submit
button, using the click event of jQuery, I tried that way but did not succeed:
$(document).ready(function() {
$('.item').click(function() {
var id = $(this).attr('rel');
var form = $("#form_" + id);
form.submit(function() {
alert('pronto!');
});
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><div><formid='form_7'action="" method='POST'>
<input type='text'>
</form>
</div>
<button class='item' rel='7'>Botão</button>
Thank you in advance