[jQuery] Re: :last :first not working??

2009-01-15 Thread MorningZ
that will get the :last (or :first) for the first row only as it will return 1 single object you need to do something like $(tr).each(function() { $(this).find(td:last).css(border, none); }); which will loop across each row and do the code to the last or first object On Jan 15, 9:05 am,

[jQuery] Re: :last :first not working??

2009-01-15 Thread the cliff
Thanks for this, I tried it and firebug tells me it didn't work :( The thing is :last doesnt seem to work AT ALL for me, EG: $(ul li:last).css(border, 1px solid red); does absolutely nothing On Jan 15, 4:06 pm, MorningZ morni...@gmail.com wrote: that will get the :last(or :first) for the

[jQuery] Re: :last :first not working??

2009-01-15 Thread MorningZ
Check out the :last-child selector http://docs.jquery.com/Selectors/lastChild and if it doesn't work, then start small... copy the example HTML from the link above and have a page with nothing but that, so you see it works in your environment. something else codewise (wrong selector,

[jQuery] Re: :last :first not working??

2009-01-15 Thread the cliff
I must apologise your code DID work I just had it in the wrong place, d-oh! Thanks for everything, Caroline On Jan 15, 4:53 pm, MorningZ morni...@gmail.com wrote: Check out the :last-child selector http://docs.jquery.com/Selectors/lastChild and if it doesn't work, then start small...