This should be real easy. Given below is the HTML.
#Attachment#
This will get you just that items text
var $item = $("#attachmentContainer").clone();
$item.children().remove();
alert($item.text());
clone the object so you don't have to remove the actual items children. Then you can remove the child elements and that will leave the innerText of the item you want.
And here's a handy little method to do this easily
jQuery.fn.trueText = function(obj){
var $item = $(obj).clone();
$item.children().remove();
return $item.text();
};
Now you can call $("#attachmentContainer").trueText()