I know that this should be simple, but cannot understand. Here is the code.
<div class="cols lmenu_item1" id="leftMenuWrapper">
<div id="leftmenu"></div>
</div>
I just need to remove "leftMenuWrapper" if "leftmenu" is empty. Here is what I used.
$('#leftmenu').empty().remove('#leftMenuWrapper');
Sorry if this is a simple question. Monday!
Thank!
source
share