The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Tricky :nth-child question Re: [Solved] Tricky :nth-child question

Chris Coyier

Careful here:


When you pull an item out of the array like that it becomes a DOM node and jQuery specific functions like addClass will not work on it anymore. You’d have to do:


to have that work. And remember that’s 0-indexed just like arrays =)