why text() in jquery is remove all the childs element code example Example: delete all child elements jquery $("div").empty();