.remove() in jQuery API

.remove() is a function in jquery for remove anything is right process.

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.   <style>{ background:yellow; margin:6px 0; }</style>
  5.   <script src=“http://code.jquery.com/jquery-latest.js”></script>
  6. </head>
  7. <body>
  8.   <p>Hello</p> 
  9.   how are 
  10.   <p>you?</p>
  11.   <button>Call remove() on paragraphs</button>
  12. <script>
  13.     $(“button”).click(function () {
  14.       $(“p”).remove();
  15.     });
  16.  
  17. </script>
  18.  
  19. </body>
  20. </html>

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>