Couldn't you just do: jQuery.fn.and = function(sel){ return this.length? this.add(sel) : jQuery([]); };
-- dz On Tue, Feb 10, 2009 at 8:57 PM, Dave Methvin <dave.meth...@gmail.com> wrote: > >> If you want to work on the elements, though, the .and() >> plugin will return either [] or [#field1, #field2] >> to the chain. > > Not true! It will return either [], [#field1], or [#field1, #field2] > so it probably wouldn't help Jörn. Duh. > > > > --~--~---------~--~----~------------~-------~--~----~ 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 jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---