Yeah, 'prox' should be 'n'. I got the wrong version of the script,
here is the proper one:

$.fn.until = function(end){
   var n = this.next(), h = [];
   while( n[0] && !n.is(end) ) {
         h.push(n[0]);
         n = n.next();
   }
   return this.add(h);
};

$('nada') or was there to create an empty jQuery object, as $()
returns the document. John Resig's plugin performs a lot better (I
finally understood it!), and works on multiple elements.

I didn't get any errors on Safari (windows) with it, test page at
http://jsbin.com/okoce/

cheers,
- ricardo

On Jan 22, 12:36 am, JLundell <jlund...@pobox.com> wrote:
> RIcardo,
>
> Thanks. Removing the .r and properly (I think) installing nextUntil as
> a plugin (that was part of my problem) made it work for Mac FF3, but
> not for Safari, which still complains about an undefined symbol.
> Unfortunately, the symbol isn't specified in the log, an the line
> number reference is past the end.
>
> WRT "until": I take it that 'prox' should be 'n'?
>
> And what's the 'end' argument? Same as nextUntil()'s?
>
> Out of idle curiosity, what's the 'nada' business?
>
> On Jan 19, 11:56 pm, Ricardo Tomasi <ricardob...@gmail.com> wrote:
>
> > Hmm. No idea what that 'r' property was.
>
> > Changing that line to
>
> > if ( jQuery.filter( expr, [i] ).length ) break;
>
> > seems to fix it.
>
> > or use this:
>
> > $.fn.until = function(end){
> >    end = $(end)[0];
> >    var n = this.next(), h = $('nada');
> >    while( n[0] != end ) {
> >          h = h.add(prox);
> >          n = n.next();
> >    }
> >    return this.add(h);
>
> > };
>
> > cheers,
> > - ricardo
>
> > On Jan 19, 10:20 pm,JLundell<jlund...@pobox.com> wrote:
>
> > > Well, almost. I'm getting an undefined on this line, I think on the
> > > length call:
>
> > > if ( jQuery.filter( expr, [i] ).r.length ) break;

Reply via email to