I'm writing this off the top of my head, but it should be at least
close to functional.

jQ: $("#id1").children().filter(function(){return
$(this).text()!="";}).filter(":eq(0)").text()


Or if you intend to use this a lot, you could write a small plugin:
(function($){
$.fn.textNode(index){
 index = index || 0;
 return this.children().filter(function(){return
$(this).text()!="";}).filter(":eq("+index+")").text();
})(jQuery);

jQ: $("#id1").textNode(); //same as $("id1").textNode(0);

~Sean

Reply via email to