[jQuery] Re: problem with wrapper arrays.......

2009-05-17 Thread kali
On May 6, 12:18 am, Karl Swedberg k...@englishrules.com wrote: On May 6, 2009, at 12:05 AM, kali wrote: On May 5, 10:05 pm, mkmanning michaell...@gmail.com wrote: Accessing the elements by index returns the element itself. To call jQuery methods you'd need to do this: divs = $('div');

[jQuery] Re: problem with wrapper arrays.......

2009-05-17 Thread kali
On May 17, 7:14 am, kali maya778...@yahoo.com wrote: On May 6, 12:18 am, Karl Swedberg k...@englishrules.com wrote: On May 6, 2009, at 12:05 AM,kaliwrote: On May 5, 10:05 pm, mkmanning michaell...@gmail.com wrote: Accessing the elements by index returns the element itself. To call

[jQuery] Re: problem with wrapper arrays.......

2009-05-17 Thread kali
On May 17, 7:14 am, kali maya778...@yahoo.com wrote: On May 6, 12:18 am, Karl Swedberg k...@englishrules.com wrote: On May 6, 2009, at 12:05 AM,kaliwrote: On May 5, 10:05 pm, mkmanning michaell...@gmail.com wrote: Accessing the elements by index returns the element itself. To call

[jQuery] Re: problem with wrapper arrays.......

2009-05-05 Thread mkmanning
Accessing the elements by index returns the element itself. To call jQuery methods you'd need to do this: divs = $('div'); div2 = divs[2]; $(div2).addClass('red'); or alternately you could do: div2 = $(divs[2]); div2.addClass('red'); you can also use .eq(#): div2 = divs.eq(2)

[jQuery] Re: problem with wrapper arrays.......

2009-05-05 Thread Karl Swedberg
On May 6, 2009, at 12:05 AM, kali wrote: On May 5, 10:05 pm, mkmanning michaell...@gmail.com wrote: Accessing the elements by index returns the element itself. To call jQuery methods you'd need to do this: divs = $('div'); div2 = divs[2]; THIS is what I did div2 = divs[2] -- is