> I agree with you, just wanted to through some ideas into the mix, but > do you agree that this is "unelegant code" > > $('#foo').fadeOut('normal',function(){ $(this).remove(); }); > > Do you have any suggestions to improve it? I think the last option I > provided is the most realistic and I think that making it clear that > you may only apply a single jquery method without arguments is within > reason. It is just a shortcut, and you can use a whole function > wrapper if you want to do something else.
One idea that I had was a special jQuery object that produces a wrapped function, something like: $("#foo").fadeOut("normal", jQuery.self.remove()); More complicated: $("#foo").fadeOut("normal", jQuery.self.hide("fast", jQuery.self.remove())); That wouldn't be "that hard" to implement (imo) - any interest? I could probably code something up if there is. --John --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---