title: removing the div appended using append method
body: <p>this is my code...append is working but removing is not working. how to remove the appended div?</p>
  
  <pre><code>&lt;html&gt;
    &lt;head&gt;
      &lt;script type="text/javascript"&gt;
        function view(){
          $('body').append('&lt;div class="added"&gt;&lt;p&gt;something&lt;/p&gt;&lt;/div&gt;');
        };
        function close(){
          $('.added').remove();
        } ;
      &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;a onclick="view();"&gt;something&lt;/a&gt;
      &lt;a onclick="close();"&gt;close&lt;/a&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>