I'm writing a jQuery plugin and I'm trying to set up a callback that takes a few parameters. How does jQuery determine which parameters are to be sent to a callback function?
In the plugin:
if (callback) {
callback.call(var1, var2, var3);
}
The written callback:
$("#div").myplugin({callback: myfunction});
myfunction(biz,bar,bim) {
alert("I love " + biz + " and " + bar + " and " + bim);
}
biz is set to var2, bar is set to var3, and bim is undefined.