title: jquery find text and replace (all)
body: <pre><code>&lt;div id="id1"&gt;
  
     apple
  
     ball
  
     dogsss
  
     dogsssdogsss
  
     dogsssdogsssdogsss
  
  &lt;/div&gt;
  </code></pre>
  
  <p>How Do I change ALL <code>dogsss</code> to <code>dollsss</code> using jquery?</p>
  
  <p>Here is a code, but how to determine the element?</p>
  
  <pre><code>$('#id1 how???').each(function() {
      var text = $(this).text();
      $(this).text(text.replace('dog', 'doll')); 
  });
  </code></pre>
  
  <p>Here is similar question <code>http://stackoverflow.com/questions/8146648/jquery-find-text-and-replace</code></p>