Alexandre Plennevaux ha scritto:
i would like to add this to the jqUploader plugin, so that i could do
something like:
function pleaseDoTheseThings (params){
$("#dothis").show();
}
$("input#example1").jqUploader({
background: "FF9900",
barColor: "FFDD00",
allowedExt: "gif",
callBack: pleaseDoTheseThings
});
Thanks a lot!
Alexandre
The principle is quite simple.
When the plugin has completed its processing, and it is up to the
plugin's author to know when it has, you just call your callback
function if setted in the options.
Something like this:
var options = {callback:function(){alert("I've finished!");}}
jQuery.fn.my_plugin_with_callback = function(options) {
this.each(function(){
...do some processing
});
if(options.callback) callback();
}
Renato