Re: [jQuery] Re: how to access elements with index in for-loop

2009-12-23 Thread Michael Geary
Wednesday, December 23, 2009 9:52 PM > *To:* jquery-en@googlegroups.com > *Subject:* Re: [jQuery] Re: how to access elements with index in for-loop > > > > thank you very much, your way is better than mine ! > > 2009/12/24 Šime Vidas > > > First of all, the "

RE: [jQuery] Re: how to access elements with index in for-loop

2009-12-23 Thread Rick Faircloth
...@googlegroups.com] On Behalf Of Eric Zhong Sent: Wednesday, December 23, 2009 9:52 PM To: jquery-en@googlegroups.com Subject: Re: [jQuery] Re: how to access elements with index in for-loop thank you very much, your way is better than mine ! 2009/12/24 Šime Vidas First of all, the "wrong&quo

Re: [jQuery] Re: how to access elements with index in for-loop

2009-12-23 Thread Eric Zhong
thank you very much, your way is better than mine ! 2009/12/24 Šime Vidas > > First of all, the "wrong" code is wrong, look this is your code: > > $(function(){ >var trs = $("#tb tr:not(:first)") > >for( var i=0; i<$trs.length; i++ ) { >//$trs[i].find("td:eq(1

Re: [jQuery] Re: how to access elements with index in for-loop

2009-12-23 Thread Eric Zhong
thanks again, i think i have understand your mind. Thanks! 2009/12/24 Richard D. Worth > The index is passed as the first argument to the callback function you > provide to .each. > > - Richard > > > On Wed, Dec 23, 2009 at 8:49 PM, Eric Zhong > wrote: > >> >> >> 2009/12/24 Richard D. Worth >

Re: [jQuery] Re: how to access elements with index in for-loop

2009-12-23 Thread Richard D. Worth
The index is passed as the first argument to the callback function you provide to .each. - Richard On Wed, Dec 23, 2009 at 8:49 PM, Eric Zhong wrote: > > > 2009/12/24 Richard D. Worth > > What about using .each? >> >> http://docs.jquery.com/Core/each#callback >> >> - Richard >> >> >> On Wed, De

Re: [jQuery] Re: how to access elements with index in for-loop

2009-12-23 Thread Eric Zhong
2009/12/24 Richard D. Worth > What about using .each? > > http://docs.jquery.com/Core/each#callback > > - Richard > > > On Wed, Dec 23, 2009 at 8:34 PM, Eric Zhong > wrote: > >> >> >> 2009/12/24 Eric Zhong >> >> when i use for-loop to access elements with array index or get() method it >>> does

Re: [jQuery] Re: how to access elements with index in for-loop

2009-12-23 Thread Richard D. Worth
What about using .each? http://docs.jquery.com/Core/each#callback - Richard On Wed, Dec 23, 2009 at 8:34 PM, Eric Zhong wrote: > > > 2009/12/24 Eric Zhong > > when i use for-loop to access elements with array index or get() method it >> doesn't work. >> but i have to use the index to access,