title: Replace All Occurrences In A String Jquery
body: <p>I have a string of data..</p>
  
  <pre><code>This is a template body for  &amp;lt&amp;ltApproved&amp;gt&amp;gt &amp;lt&amp;ltSubmitted&amp;gt&amp;gt
  </code></pre>
  
  <p>I want to replace "&amp;lt" with "&lt;&lt;" and "&amp;gt" with ">>"</p>
  
  <p>To replace "&amp;lt" I wrote this code..</p>
  
  <pre><code> var body = $('#txtHSliderl').val().replace("&amp;lt", "&lt;&lt;");
  </code></pre>
  
  <p>But it only seems to replace the first occurrence..</p>
  
  <pre><code>This is a template body for  &lt;&lt;&amp;ltApproved&amp;gt&amp;gt &amp;lt&amp;ltSubmitted&amp;gt&amp;gt
  </code></pre>
  
  <p>How do I replace all occurrences?</p>