title: Using jquery to change the value of the for attribute in a label tag
body: <p>Is it possible to change the value of the for attribute in a label tag with jquery?</p>
  
  <p>e.g. </p>
  
  <pre><code>&lt;label for="xxx"&gt;I am not changing&lt;/label&gt;
  to 
  &lt;label for="yyy"&gt;I am not changing&lt;/label&gt;
  </code></pre>
  
  <p>I have been dynamically changing the name/id of the associated input but i cant work out how to change the label for value.</p>
  
  <p>This is how i did the name/id change</p>
  
  <pre><code>$('#myinput_'+oldidnum).attr("name","myinput_"+newidnum);
  $('#myinput_'+oldidnum).attr("id","myinput_"+newidnum);
  </code></pre>
  
  <p>thanks in advance 
  :D</p>