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() {
Use arguments variable.
function TestMe() { var args = arguments; for (var a in args) { alert(args[a]); } }
Now you can pass any number of arguments to TestMe function:
TestMe
TestMe(1); TestMe(1,2,3); TestMe(1,2,3,4,5,6); TestMe.apply(this, [1,2,3,4,5]);
etc.