jlmakes / scrollreveal

Animate elements as they scroll into view.
https://scrollrevealjs.org/
22.35k stars 2.26k forks source link

Use CSS selector like :not() to target #363

Closed skube closed 7 years ago

skube commented 7 years ago

I understand you can target using querySelectorAll. Is there a way to use pseudo class selectors such as :not()

For example, to all .bar except the first one:

sr.reveal(document.querySelectorAll('.bar:not(:first-child)'));
jlmakes commented 7 years ago

You can pass any valid CSS selector to the reveal() method. See Live Example