I am trying to submit a form using .ajax() jquery function
function submitForm()
{
$("#quiz").ajaxForm({
target: '#result',
type: 'post',
beforeSubmit: before_submit,
success: showResponse
}).submit();
}
the problem is form gets submitted in second attempt i.e. when i click twice.