Correct me if I'm wrong, but it seems that jQuery event handling is completely separate from javascript event handling. I know that the execution order of jQuery and javascript event handlers themselves is undefined, but is it possible to assume that all javascript handlers will be executed before jQuery?
As an example , given in the answer to this question , which seems to be the case.
Also, is there any preference when executing the built-in javascript event handlers over related ones?
For clarification, I ask about this because I encountered a problem when I have a built-in event handler in the onClick event of the onClick element that calls the submit() method of the closing form. Before submitting the form, I want to dynamically add hidden inputs to the form. Now I am doing this:
var preSubmit = function preSubmit() {
But I'm really wondering if there is a more elegant way, and I really need an explanation.
source share