I have a list of elements on a page, for the sake of discussion we can say I have the following:
<div id="group_01">
<div id="entry_1-01">stuff <a href="delete">x</a></div>
<div id="entry_1-02">stuff <a href="delete">x</a></div>
</div>
<div id="group_02">
<div id="entry_2-01">stuff <a href="delete">x</a></div>
<div id="entry_2-02">stuff <a href="delete">x</a></div>
</div>
The delete link calls an Ajax request and deletes the entry, after a succesful Ajax call, the entry div is removed from the page. My question is:
How can I remove the containing group div once all of it's entries have been deleted?
I hope that's a detailed enough question. I feel like this isn't anything new, yet two days of search has resulted in nothing.