yes I use Firebug and I have no idea why it doesn't work :/ (i don't see class="last" added), maybe it's other scripts or styles fault. If I find error I'll write.
On 6 Sty, 02:33, Karl Swedberg <[EMAIL PROTECTED]> wrote: > Hi Tomek, > > It works fine for me. How are you testing this? If you have Firefox > with Firebug, inspect the last-child element after adding the class. > When I did so, I saw this: > > <div class="info green last">bar </div> > > (I had added "bar" to the HTML for the sake of my test.) > > --Karl > _________________ > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > On Jan 5, 2008, at 7:22 AM, poncjusz wrote: > > > > > Hi, > > > I've got strange problem with :last-child selector, my html structure: > > <div class="box-full"> > > <div class="info green"> > > </div> > > <div class="info green"> > > </div> > > </div> > > > and jquery script: > > $(".box-full .info:last-child").addClass("last"); > > > what is strange that > > $(".box-full .info:first-child").addClass("last"); > > works perfect! > > > thanks in advance > > > Tomek