Jquery - How to trigger $('#myForm').submit(function()

Peter picture Peter · Sep 6, 2011 · Viewed 45.7k times · Source

how can i trigger this function without using the form submit?

$('#myForm').submit(function()
{ ....

Answer

ipr101 picture ipr101 · Sep 6, 2011

You could try -

$('#myForm').trigger('submit');

Working demo - http://jsfiddle.net/ipr101/KvwMb/1/