Re: [jQuery] Break out of each loop
That's a leftover from ColdFusion :) I didn't test whether your solution works, but I guess it should (from a quick look at jQuery code) Thank you! Erik Beeson wrote: > Also, what is that ## selector about? > > --Erik > > On 3/30/07, Dmitrii 'Mamut' Dimandt <[EMAIL PROTECTED]> wrote: > >> This is a question I got from a friend of mine: >> >> $("##players tr:gt(0)").each( >> function() >> { >> s = parseFloat($("td:eq(0)", this).text()); >> } >> ); >> >> How do I break out of this loop? I don't need to go to the very end. >> >> ___ >> jQuery mailing list >> discuss@jquery.com >> http://jquery.com/discuss/ >> >> > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Break out of each loop
Venturing a guess, I'd say maybe try returning false? --Erik On 3/30/07, Dmitrii 'Mamut' Dimandt <[EMAIL PROTECTED]> wrote: > This is a question I got from a friend of mine: > > $("##players tr:gt(0)").each( > function() > { > s = parseFloat($("td:eq(0)", this).text()); > } > ); > > How do I break out of this loop? I don't need to go to the very end. > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Break out of each loop
Also, what is that ## selector about? --Erik On 3/30/07, Dmitrii 'Mamut' Dimandt <[EMAIL PROTECTED]> wrote: > This is a question I got from a friend of mine: > > $("##players tr:gt(0)").each( > function() > { > s = parseFloat($("td:eq(0)", this).text()); > } > ); > > How do I break out of this loop? I don't need to go to the very end. > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/