delete an element jquery empty vs remove code example Example: jquery if empty remove div //if empty remove parent $('#id:empty').parent().remove();