Andres Carvajal Andres Carvajal - 2 months ago 20
jQuery Question

How can I completely remove a list item and its content?

i canĀ“t remove li and html content, my html looks like:

<a href="#dialog-form-image" rel="modal:open">
<img src="" name="img_164" id="flexslider">

Remove action depend click a button with name of image.

var id_img = $(this).attr("name");



The problem is prev() is siblings, not the parent. You need to select the parents to get to the li.