title: Is there a simple JQuery procedure for a string replacement across every piece of inner text on the page?
body: <p>Don't ask why I need this. What I need is some simple procedure, if there is one, to replace every instance of a word with another word. I'm not that experienced with JQuery, but I know it would be something equivalent to </p>
  
  <pre><code>$(document).ready(function(){
      var allElements = $('*');
      for each (var thisElement in allElements)
      {
          var newText = thisElement.text().replace("foo", "bar"); 
          thisElement.text(newText);     
      }
  });
  </code></pre>
  
  <p>Would that work? Is there a better way? Deliver me a 1-liner if possible. </p>