Okay, I found the solution after digging in the jquery file a bit. The key is triggering the event not via trigger, but using triggerHandlers. The return value of this function is the return value of the bound event function.
Regards, Emil Ivanov On Nov 8, 5:56 pm, Emil Ivanov <[EMAIL PROTECTED]> wrote: > Hi folks, > > I'm developing a plugin (my first evel jQuery plugin), and I want to > capture the return value from a user function, bound to event. > Basically, what I want is to be able to undo the event - like > returning false in a link click will now follow the link. > Here is some code: > // in the plugin > self.click(function () { > var return_value = self.trigger('action', [currentProgress])); > if (!return_value) undo(); > > }); > > // userland > $('#item').bind('action', function () { > return window.confirm('Sure?'); > > }); > > Regards, > Emil Ivanov