I wrote a jquery plugin about lottery like, which generate a "lucky" number. It provide "start" and "stop" function. I thought the stop function just hook on $.lottery.stop is ugly, meanwhile, how to make the plugin more robust. Advice is always welcome. code is here: http://jsfiddle.net/yougen/gHHWm/
When I digged into jQuery.Callbacks in jQuery source code, I confused about the difference between disable() and lock() function. My question is 1.in which case use disable(), and in which case using lock(). 2.what the "stack" variable used for?