check whether the dic is empty in js code example Example: js check if div is empty if ($('#element').is(':empty')){ //do something }