how can i trigger this function without using the form submit?
$(\'#myForm\').submit(function()
{ ....
You will have to dig it from DOM data. But, let me tell you, its not recommended. Try this,
var form = $('#myForm');
var data = form.data();
var events = data.events;
If the handler function is attached to form 'submit', it will be present as,
var submit_list = events.submit;
Now, if all goes well, at best you can get submit_list as list of all the handler objects attached to submit event of form.
Shortcut:
Assuming you have one and only one handler attached to submit event for #myForm,
$('#myForm').data().events.submit[0].handler
is your function.
Play with data(), but remember its not recommended. Happy Coding.