title: Jquery remove. button within div to be removed
body: <p>I have an list item with a button inside of it. The button is attached to a jquery function to remove the list item.</p>
  
  <pre><code>    //Delete Button - delete from cart
      $('.ui-icon-trash').click(function() {
          $(this).closest('li').remove()
      });
  
  &lt;li&gt;
  content here....
  &lt;a href="#" title="Remove from cart" class="ui-icon ui-icon-trash"&gt;Remove from cart&lt;/a&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>Why isn't this working?? Is it because the button is within the item i want to remove? Is there a way around this??</p>