:last-child
returs true is the very last child is of this type (div
in this case).
JSBin links script
s at the bottom of the page (before
), so :last-child
can works with script
element only.
Solution is to move scripts into head
section using document.ready
or after