Don't use .text(), you'll get an array-like object of text nodes. Try var text = $('div').contents().filter(function(){return this.nodeType==3;}); console.log(text)
On May 2, 6:06 pm, nick <nboutel...@gmail.com> wrote: > Thanks for the response. Are you sure thats correct though? > > alert($('div').contents().filter(function(){return > this.nodeType==3;}).text()); > > returns empty.