I\'m trying to give my plugin callback functionality, and I\'d like for it to operate in a somewhat traditional way:
myPlugin({options}, function() {
/*
Change your plugin function to take a second parameter. Assuming that the user passes a function, that parameter can be treated as a regular function.
Note that you can also make the callback a property of the options parameter.
For example:
$.fn.myPlugin = function(options, callback) {
...
if(callback) //If the caller supplied a callback
callback(someParam);
...
});