Check if div is or not empty jQuery

Check if div is or not empty jQuery

by Ayri Rin

HTML

<div id="id1" class="class1"></div>

JavaScript

if ($('div.class1').is(':empty')) {
    alert('is empty');
}
else {
    alert('not empty');
}