check if html element is empty javascript vanilla code example Example: js check if div is empty if ($('#element').is(':empty')){ //do something }