Actually, I think this bring much more clarity
// recommended way by documentation since it's easier to read
$(document).ready(function(){
// For easier reading, don't mix too much css-expressions. This
will also be much faster to the sizzle-engine to interpretate
// The css-method is also
2009/12/24 Eric Zhong ericiszhongwen...@gmail.com
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, what happen please .
ok: http://jsbin.com/olego
wrong: http://jsbin.com/ulixu
wrong:
What about using .each?
http://docs.jquery.com/Core/each#callback
- Richard
On Wed, Dec 23, 2009 at 8:34 PM, Eric Zhong ericiszhongwen...@gmail.comwrote:
2009/12/24 Eric Zhong ericiszhongwen...@gmail.com
when i use for-loop to access elements with array index or get() method it
doesn't
2009/12/24 Richard D. Worth rdwo...@gmail.com
What about using .each?
http://docs.jquery.com/Core/each#callback
- Richard
On Wed, Dec 23, 2009 at 8:34 PM, Eric Zhong
ericiszhongwen...@gmail.comwrote:
2009/12/24 Eric Zhong ericiszhongwen...@gmail.com
when i use for-loop to access
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 ericiszhongwen...@gmail.comwrote:
2009/12/24 Richard D. Worth rdwo...@gmail.com
What about using .each?
http://docs.jquery.com/Core/each#callback
thanks again, i think i have understand your mind. Thanks!
2009/12/24 Richard D. Worth rdwo...@gmail.com
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
ericiszhongwen...@gmail.comwrote:
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)).attr(style,color:red); //wrong
thank you very much, your way is better than mine !
2009/12/24 Šime Vidas sime.vi...@gmail.com
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++ ) {
Ø this is a pretty stupid way to loop through a jQuery
object
Is it necessary to be insulting to be helpful, Eric? What was your
code like when you first began to write JS or jQuery? Always
perfect and mature, I’m sure…
Rick
From: jquery-en@googlegroups.com
On Dec 23, 10:01 pm, Rick Faircloth r...@whitestonemedia.com
wrote:
Ø this is a pretty stupid way to loop through a jQuery
object
Is it necessary to be insulting to be helpful, Eric? What was your
code like when you first began to write JS or jQuery? Always
perfect and mature, I’m sure…
Don't sweat it, dude.
First off, Eric didn't post the comment you're referring to. And if he had,
I'd be inclined to cut him some slack. After all, Eric's English is *much*
better than my Chinese (or whatever Eric's native language is).
Second, we all post something once in a while that offends
11 matches
Mail list logo