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

2009-05-17 Thread kali
On May 17, 7:14 am, kali wrote: > On May 6, 12:18 am, Karl Swedberg wrote: > > > > > On May 6, 2009, at 12:05 AM,kaliwrote: > > > > On May 5, 10:05 pm, mkmanning wrote: > > >> Accessing the elements by index returns the element itself. To call > > >> jQuery methods you'd need to do this: > >

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

2009-05-17 Thread kali
On May 17, 7:14 am, kali wrote: > On May 6, 12:18 am, Karl Swedberg wrote: > > > > > On May 6, 2009, at 12:05 AM,kaliwrote: > > > > On May 5, 10:05 pm, mkmanning wrote: > > >> Accessing the elements by index returns the element itself. To call > > >> jQuery methods you'd need to do this: > >

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

2009-05-17 Thread kali
On May 6, 12:18 am, Karl Swedberg wrote: > On May 6, 2009, at 12:05 AM, kali wrote: > > > On May 5, 10:05 pm, mkmanning 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]; > > > TH

[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 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 IGNORED It's NOT ig

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

2009-05-05 Thread kali
On May 5, 10:05 pm, mkmanning 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 IGNORED pls run http://www.mayacove.com/dev/jquery/arr

[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) div2.addClass('red