Hi,
I need to check in some fast way if there is any text nodes on page, excluding white space. Preferably, I'd like to see if there is a way to do this with jQuery, and to be cross-browser.
Thanks
Hi,
I need to check in some fast way if there is any text nodes on page, excluding white space. Preferably, I'd like to see if there is a way to do this with jQuery, and to be cross-browser.
Thanks
if( $.trim($("body").text()).length > 0 ){
...
}
or, if you want to exclude all white space...
$("body").text().replace(/\s/g,'').length > 0 ){