Andres Carvajal Andres Carvajal - 1 year ago 97
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");


Answer Source

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



Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download