empty(): remove all event handlers and internally cached data. : empty « jQuery « JavaScript Tutorial






<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){

                  $("p").click(function () {
                      $(this).empty();
                  });

                
         
        });
    </script>


    
  </head>
  <body>
    <body>
            <p>World</p>
            <div>Replaced!</div>
                 
    </body>
</html>








30.33.empty
30.33.1.Remove all child nodes
30.33.2.empty(): remove all event handlers and internally cached data.