Interesting plugin, Wil... I wouldn't use it everywhere, since the cost for jQuery method calls is doubled, also because of the weight of triggering so much events, but in a project that doesn't rely so much in jQuery, I think it would be rather nice to use... and also prevent unwanted behaviours in the document.
Thanks! Diogo Wil Stuckey escreveu: > I implemented a plugin like what Ariel mentioned. > > http://quiiver.appspot.com/method_observer_for_jquery > > Let me know what you think. > > Thanks, > Wil > > On Dec 1, 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 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 -~----------~----~----~----~------~----~------~--~---
