There is a plugin for that already:

http://docs.jquery.com/JQuery_1.2_Roadmap#.nextUntil.28.29_.2F_.prevUntil.28.29

or use my made-just-in-time low-performance variant:

$.fn.until = function(end){

   end = $(end)[0];
   var prox = this.next();
   var holder = $('nada');
   while( prox[0] != end ) {
         holder = holder.add(prox);
         prox = prox.next();
   }
   return this.add(holder);

};

- ricardo

On Oct 30, 1:15 pm, Sam H <[EMAIL PROTECTED]> wrote:
> Anyone?  I might have to write a plugin to do this....hmm

Reply via email to