I\'ve got a a bunch of DIV elements in my HTML, several of which have their class attribute set to \"rowsLayout\". Some of these rowsLayout DIVs can be nested inside one an
Why not use :empty?
JQuery Empty
EDIT: It also works as a CSS Selector:
:empty { background-color: black; }
MORE EDITS:
:last-of-type almost works, but it gets 'a' for some reason. See my fiddle.
:last-of-type
http://jsfiddle.net/DUdVR/3/