I'd like to hide (remove) all <div>
that contain a certain string. Like a filter. Think of it having the functionality of a browser add-on.
Basically anything that is
- Within a tag within the div, or
- Immediately inside the div (but not a tag)
Any ideas of how to best do this efficiently? Ideally I'd like a way to have the browser respond well to this by not only hiding the div, but removing it in such a way that the page has no large blank spaces.
I'm really not super fluent in javascript, so thought I'd see if I could get some pointers here. (And is better to use straight JS or JQuery?)
thanks!