jquery if div is empty
function isEmpty( el ){
return !$.trim(el.html())
}
if (isEmpty($('#element'))) {
// do something
}
3
2
//if empty remove parent
$('#id:empty').parent().remove();
Thank you!
2
0
Are there any code examples left?
New code examples in category Javascript