Remove nodes fetched using document.querySelectorAll

Find html nodes using document.querySelectorAll and remove them.

var nodes = document.querySelectorAll('.someSelector');
nodes.forEach(node => node.parentNode.removeChild(node));
Did this help you? Please let me know with a comment. Thank you
Posted .

Comments (RSS)

Leave a comment