Skip to content
Robbie Chipka edited this page Feb 4, 2016 · 2 revisions

The :before selector filters nodes that appear in the document before another node. The first argument is a selector representing a node that appears after.

Usage

document.querySelectorAll('.heading:before(.content)')
Clone this wiki locally