Accepted answer

This will work:


See jsFiddle here

The reason you need two nested indices is that all selections are grouped implicitly. If you'd like to know the deeper reasons for this, or want to understand selections better in general, see this article

Related Query

More Query from same tag