title: How to highlight words in html using jquery
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/119441/highlight-a-word-with-jquery">Highlight a word with jQuery</a>  </p>
  </blockquote>
  
  
  
  <p>I want to highlight certain words in html <code>&lt;body&gt;</code> tag, but I want to avoid highlighting those which are within <code>&lt;a&gt;</code> tag. How can this be done? By highlight I mean, underlining and making word bold.</p>
  
  <p>For e.g I have this html content </p>
  
  <pre><code>&lt;body&gt;
  &lt;p&gt;
  This is sample text for the purpose of highlighting searched text. Please visit &lt;a href="javascript:void(0)"&gt;www.sampleSite.com&lt;/a&gt;
  &lt;/p&gt;
  &lt;/body&gt; 
  </code></pre>
  
  <p>Now when I search for the word "sample", I would not want to highlight the word <strong>sample</strong> contained within that anchor tag.</p>