[Answer]-Delete the closest li in the hierarchie in the success of ajax

1👍

You have the same id on the 2 loops for your li.
You should use a prefixe on each one, depending on your loops.

The first one :

<li id="a-{{ac.id}}">

The second one :

<li id="ver-{{ac.id}}">

And change in you “” accordingly

An id, must be unique as its name suppose it 😛

Additionaly, I don’t understand why you are using the closest method ?

$('#'+cid).remove();

should be enough.

Leave a comment