<div class="container-mob"></div>
I have multiple divs like this, some of them are empty (have no children) and all of them have the same class name. I want to remove the empty divs. I've tried:
if ($('.container-mob').is(':empty')) {
$('.container-mob').remove();
}
Is there any way to do this with jQuery or JavaScript?