Is it possible to change the value of the for attribute in a label tag with jquery?
e.g.
<label for="xxx">I am not changing</label>
to
<label for="yyy">I am not changing</label>
I have been dynamically changing the name/id of the associated input but i cant work out how to change the label for value.
This is how i did the name/id change
$('#myinput_'+oldidnum).attr("name","myinput_"+newidnum);
$('#myinput_'+oldidnum).attr("id","myinput_"+newidnum);
thanks in advance
😀
See if your label is this: http://jsfiddle.net/QTM45/
and if you want to change the
forattribute value then use this:if you assign an id to that label then