I have written a function on submit of a form like this:
$("#form").submit(function(){
// do something
});
And form is submitted like this:
document.formName.submit();
It doesn't trigger my function. If I wrap form in jQuery and then submit it, it works fine:
$(document.formName).submit();
I was thinking binding events to jQuery DOM object will trigger the events on raw DOM object as well, but it doesn't happen in this case.
Example: