title: Jquery Replace function not working properly in ie7 and ie 8
body: <p>I have the following Raduio buttons with Labeles associated with that. </p>
  
  <pre><code>&lt;div id="dependents"&gt;
      &lt;input ng-non-bindable  type="radio" id='Partner' name="relationship" class="dependent-relation" value='P' /&gt;
      &lt;label for="Partner"&gt;Prtner&lt;/label&gt;
  
      &lt;input ng-non-bindable  type="radio" id='Child' name="relationship" class="dependent-relation" value='C' /&gt;
  
      &lt;label for="Child"&gt;Child&lt;/label&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Above div will be added dynamically to the page. We can have multiple dependants.</p>
  
  <p>So every time while appending this div, i'm changing the <code>Id, name</code> of Radio button along with <code>for</code> label. Below is the script i'm trying to replace.</p>
  
  <pre><code>var html = htmlContent; // html content will be above code
  html = html.replace('Partner', 'Partner' + count); // Replacing Id : Working fine
  html = html.replace('for="Partner"', 'for="Partner' + count + '"'); // Replacing for : Not working
  html = html.replace('Child', 'Child' + count); // Replacing Id : Working fine
  html = html.replace('for="Child"', 'for="Child' + count + '"'); // Replacing for : Not working
  </code></pre>
  
  <p>This is working perfect in IE9, IE 10, chrome, but its not working IE7 and IE8.</p>
  
  <p>Can any one help me on this?</p>
  
  <p>I have found the problem...</p>
  
  <p>I think whenever i tried to replace like this </p>
  
  <pre><code>html = html.replace('name="relationship"', 'name="relationship"' + count + '"'); 
  </code></pre>
  
  <p>its not working(only in IE 8 &amp; 7). Any suggestion???</p>