I was think about making a plugin that overloads jQuery methods and
notifies calls to them with events.

Pretty much like the example you're showing, but for any method.

Cheers

--
Ariel Flesler
http://flesler.blogspot.com/

On Dec 1, 10: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 Baederhttp://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