Hi guys, I am trying to change the id's of all of the check boxes inside of a parent container, but thus far I have ot been able to get it to work, here is my code,
HTML:
<div data-custom='other_container' class='container'>
<h3>Other:</h3>
<div class='container'>
<label for='monitoring'>Monitoring and verification of energy savings: </label>
<div>
<input type='checkbox' name='other' id='monitoring' class='validate[minCheckbox[1]] checkbox' />
</div>
</div>
<div class='container'>
<label for='engineering'>Engineering & project management: </label>
<div>
<input type='checkbox' name='other' id='engineering' class='validate[minCheckbox[1]] checkbox' />
</div>
</div>
<div class='container'>
<label for='energy_audits'>Energy audits: </label>
<div>
<input type='checkbox' name='other' id='energy_audits' class='validate[minCheckbox[1]] checkbox' />
</div>
</div>
</div>
jQuery:
$("[data-custom='other_container']").children('input').attr('id', 'test');
Any idea on what could be wrong with this?
Thanx in advance.