How can I hide all
<h2>’s except the first one?
I am familiar that we can use something like:
But not sure how to hide all except the first one. Can someone point me in the right direction? Would like something that is cross-browser compatible.
Here is one option using the adjacent sibling selector
Probably your best option as
+ is supportted by IE7+
Selectors such as
:not only work in IE9+