title: Adding delete button to a div
body: <p>I am going to add a delete button to new items made. This delete button removes the item my-item from the page without affecting others.</p>
  
  <p>Code I have tried: </p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;meta charset = "UTF-8"&gt;
      &lt;title&gt;Simple Demo&lt;/title&gt;
      &lt;style&gt;
        .my-item{
        width:250px;
        heigth:180px;
        margin:10px;
        padding:20px;
        background:green;
        border:2px solid black;
        }
        .item-header{
        width:150px;
        heigth:120px;
        margin:5px;
        padding:10px;
        background:yellow;
        border:1px solid black;
        }
        .item-body{
        width:70px;
        heigth:50px;
        margin:3px;
        padding:5px;
        background:purple;
        border:1px solid black;
        }
      &lt;/style&gt;
      &lt;script src="http://code.jquery.com/jquery-latest.min.js"&gt;&lt;/script&gt;
      &lt;script&gt;
        $(document).ready(function() {
          $("#divButton").click(function(){
            $(".my-item").clone().appendTo("body")
  
            });
  
            $("#toggle").click(function(){
              if ($(".item-body").is(":visible")){
                $(".item-body").slideUp("normal");
              }else{
                $(".item-body").slideDown("normal");
              }
            });
  
            $("#deleteButton").click(function(){
              $(".my-item").append(".my-item"+ "button        class="deleteButton"&gt;Delete&lt;/button&gt;");
            });
          });
      &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div class="my-item"&gt;
        &lt;div class="item-header"&gt;
          &lt;h2 id="toggle"&gt;Click Me!&lt;/h2&gt;
          &lt;div class="item-body"&gt;My Text!
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;button id="divButton"&gt;Click!&lt;/button&gt;
      &lt;button id="deleteButton"&gt;Delete!&lt;/button&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I'll be glad if you can help me. :)</p>