Copy the element, free the EM, and finally remove the span (test) tag:
var clone = $("#label"+div_id+"").clone(); clone.find('em').empty().remove('span'); alert(clone.text());
I will say that @ozan's solution is the best (if a little less readable) and does this in only one line:
alert($("#label"+div_id+"").clone().children().remove().end().text());
source share