Let’s say, I’ve a input button like this:
<code>
<input type="submit" value="Submit" onclick="fxn1();fxn2();fxn3();"/>
</code>
Now, i wan’t to add a new function fxn() (prepend or append) to the list of functions already assigned to onclick event. How would I do that? Also, the number of functions assigned to onclick is not known and hence can be anything greater than 0 or even 0 sometimes.
jQuery.Callbacksdo the needful. introduces in jQuery v1.7The following are two sample methods named fn1 and fn2:
Reference