Created
May 19, 2015 10:06
-
-
Save kawanet/111884a339b43b1b599f to your computer and use it in GitHub Desktop.
remove DOM elements without jQuery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// $("#id").remove(); | |
Array.prototype.forEach.call(document.querySelectorAll("#id"), Function.prototype.call.bind(document.body.remove)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment