I suppose the following code:
jQuery(\"#mybutton\").click(function(){
//do something
});
How could I recall to this function \"anonym
You can indeed name your anonymous function:
jQuery("#mybutton").click(function doWork(){
if (working){
setTimeout(doWork, 200);
return false;
}
//do something
});
You can also use arguments.callee:
jQuery("#mybutton").click(function(){
if (working){
setTimeout(arguments.callee, 200);
return false;
}
//do something
});
I'd go with the former.