there *more than likely* is a quicker all in one selector to do this, but this
http://jsbin.com/ijana/edit works as you asked plus might be easier to follow :-) On Dec 14, 2:28 pm, wandrian <mattba...@mac.com> wrote: > Hey folks. > > I am having a selector issue. Wondering if anyone might want to offer > their advice. > > I have a set of container divs. For each of the containers I am trying > to select the *first visible child element* and add a class to it of > first. I have built out an example in jsbin. At the moment my selector > is finding the first child of each div and only adding a class of > first if that div is visible - which is wrong - seems to be doing > things backwards. > > http://jsbin.com/opaze3/edit > > Any advice would be greatly appreciated. > > Cheers, > Matt