Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
gregmac
· 7y ago · 0 comments
Sometimes you just have a single element to show/hide on an otherwise static or very simple page. It's satisfying to make that work in minutes with just a couple lines of code, which you can craft/tweak in your browser dev tools console if you like.
Comments
[–]
simplify
7y ago
If that's the case, then document.querySelector works like a charm.