$("#form").submit(function() {
$(this).ajaxSubmit({
beforeSubmit: function(before) {
$('.result').html('loading');
},
success: function(d) {
//result process
}
});
return false;
});
When i click the submit button, This function works very good. But I would like to submit the form when a button is pressed. The above function is written in side
$(document).ready(function() {
But i want to write it inside a normal javascript function.
I am using the form plugin. form.min.js