I would like the below function to be more flexible and accept multiple callbacks to other functions if they are defined in the arguments.
$(function() {
Yes this is possible, here's an example :
function myfunct() { var arguments = myfunct.arguments; for (var i = 0; i < arguments.length; i++) { alert("Argument " + i + " value = " + arguments[i]); } }
You can call this fonction by any number of arguments :
myfunct("foo"); myfunct("foo","bar");