Skip to content
Related Articles

Related Articles

How to remove all paragraphs from the DOM using jQuery ?

Improve Article
Save Article
  • Difficulty Level : Medium
  • Last Updated : 21 May, 2021
Improve Article
Save Article

To remove elements and content, we use jQuery remove() method which removes the selected element as well as everything inside it, also it will remove all bound events associated with that target element.



Example :


<!DOCTYPE html>
    <!-- JQuery CDN directed from the JQuery website -->
      $(document).ready(function () {
        $("button").click(function () {
 <div style="padding-top: 90px; padding-left: 200px">
      <p style="font-size: 40px">
        Welcome to GeeksforGeeks!
      <p style="font-size: 40px">
        Computer Science portal For geeks.
      <p style="font-size: 40px;">
        Learn DS-ALGO From here at your own pace.
      <button style="padding: 12px">


remove() method

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!