[jQuery] Selector Madness! How to Select all the Text on a Page?

[jQuery] Selector Madness! How to Select all the Text on a Page?


Okay I have read and reread http://www.learningjquery.com/2006/11/how-to-get-anything-you-want-part-1
and
http://www.learningjquery.com/2006/12/how-to-get-anything-you-want-part-2
and still cannot figure out how to grab all the text (not the markup)
on a page. I am toying with the Google Translation API and am
attempting to parse all text, translate, and put it back. I have the
looping logic (and the 500 char limit issue with Google) sorted out,
but I can't get the fundamental part down...GRABBING ALL THE TEXT.
So let's say you have markup like so
<ul>
<li><a href=somelink>blabh blah 1</a></li>
<li><a href=somelink>blabh blah 2</a></li>
<li><a href=somelink>blabh blah 3</a></li>
</ul>
and even
<h1>some heading</h1>
and

Some paragraph text


etc. etc.
I want to be able to grab all the text and manipulate it.
I've tried $("#mainContainerDiv *").each(...some function....), but
this crashed the system.
I would like to do something like this:
$("#mainContainerDiv *.text".each(....some function...), but this
clearly won't work.
Any help is greatly appreciated.