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');
}
by Ayri Rin
<div id="id1" class="class1"></div>
if ($('div.class1').is(':empty')) {
alert('is empty');
}
else {
alert('not empty');
}