title: Add items to ul and delete them
body: <p>I want to add some list items to and unorderdlist  with a click on a button.
  And I want to delete those items when I click on a button.</p>
  
  <p>This is what I have made.. I can add them but not delete them. Can you help me?</p>
  
  <pre><code>&lt;div class="mydive"&gt;
  &lt;button id="add"&gt;click&lt;/button&gt;
  &lt;div data-titel="Dit is de titel" data-price="55 euro"&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;ul&gt;
  
  &lt;/ul&gt;
  
  $('#add').click(function() {
      var activiteit = $(this).next('div').data();
      var title = activiteit.titel;
      var price = activiteit.price;
      $('ul').append("&lt;li&gt;" + title + price + "&lt;/li&gt;" + "&lt;button class='delete'&gt;delete&lt;/button&gt;");
  });
  $('.delete').click(function() {
      $(this).prev('li').remove();
  });
  </code></pre>
  
  <p><a href="https://jsfiddle.net/ezmmzqmL/" rel="nofollow">JSFIDDLE</a></p>