I would like to determine when the <ul>
tag is empty after removing <li>
tags. Can someone help me?
There is a html code:
$(document).on('click', '.close', function(e) {
$(this).parent().fadeOut("normal", function() {
$target.remove();
});
if ($(this).closest(".indexy").not(".info")) {
alert("prazdne");
}
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<ul class="indexy">
<li class="info">ASD<button type="button" class="close">×</button></li>
<li class="info">FGH<button type="button" class="close">×</button></li>
<li class="info">JKL<button type="button" class="close">×</button></li>
</ul>