I’ve looked at example codes but for some reason this isn’t working. First of all I have a radio button that I assigned a class to it. I am assigning a class because there may be more than one. In addition, there are radio checkboxes that are disabled by default but only clickable once I click that radio button. The initial disabling works in jQuery but making them enabled isnt working.
Here is the Javascript code in my header:
<script type="text/javascript">
$(function() {
$('.smatch').attr('disabled', 'disabled');
});
$('.dradio').click(function(){
$('.smatch').removeAttr('disabled');
});
</script>
Now here is the HTML
<input type="radio" name="assign" class="dradio" value="1"> Value 1<br><br>
<li style="margin-left:25px; margin-top:10px;"><input type="checkbox" class="smatch" name="smatch[]" value="Mon"></li>
<li style="margin-left:25px; margin-top:10px;"><input type="checkbox" class="smatch" name="smatch[]" value="Tue"></li>