title: Shopping Cart with localstorage - how to remove product
body: <p>I made shoppping cart. I am using localstorage. But i have problem with removing products, what is bad ?</p>
  
  <pre><code>function showElems(){
      $(".cart1").html("&lt;ul class='cartx'&gt;&lt;/ul&gt;")
      for (var i = 0; i &lt; localStorage.length; i++)   {
          $(".cartx").append("&lt;li class='" +localStorage.key(i) + "' '&gt;" + localStorage.key(i) + "x" + localStorage.getItem(localStorage.key(i)) + 
              "&lt;button class='removeitem' data-remove='" + localStorage.key(i) + "'&gt;REMOVE&lt;/button&gt;&lt;/li&gt;");
      };
  };
  
  showElems();
  
  $(".add").click(function(){
      var product = $(this).attr("data-name");
      localStorage.setItem( product, 1 ); // dodanie jednej sztuki do koszyka
      showElems();
  });
  
  /* NOT WORKING */
  
  $(".removeitem").click(function(){
      var productremove = $(this).attr("data-remove");
      localStorage['kubek'] = null;
  });
  </code></pre>
  
  <p><a href="http://codepen.io/dominikx96/pen/rLgjrA" rel="nofollow">http://codepen.io/dominikx96/pen/rLgjrA</a></p>