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