We do this in jQuery UI. See

http://code.google.com/p/jquery-ui/source/browse/tags/1.5.2/ui/ui.core.js#66

- Richard

On Mon, Dec 1, 2008 at 7:02 PM, Diogo Baeder <[EMAIL PROTECTED]> wrote:

> Hi, guys,
>
> Just brainstorming: what to you think of adding a second argument to the
> "remove()" method, for it to trigger a 'remove' event? I've dealed with code
> that could be more elegant if observers were aware of such an event, so to
> avoid memory leaks and useless processing...
>
> Of course a solution like this:
>
> jQuery.fn.removeAndNotify = function() {
>     this.trigger('remove'); // Or this.trigger('remove.someNamespace')
>     this.remove();
> };
>
> can be implemented, but I wonder if it could be slightly more generic than
> that... you guys ever felt the need for it?
>
> --
> Diogo Baeder
> http://www.diogobaeder.com.br
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to