[ad_1]
The script below will uncheck and add the disabled attribute to input elements when #alt_hp
change function is triggered. It all works, except when the select option with value 0
is selected, those checked boxes are unchecked, even though they shouldn’t be.
<select wire:model.defer="determined" id="determined" name="determined">
<option selected value>Please Select</option>
<option value="0">Published HP Figure (DIN)</option>
<option value="1">Measured with Dynojet+Dyno</option>
<option value="2">Measured with Mustang Dyno</option>
<option value="3">Measured with Engine Dynamometer Cell</option>
</select>
$('#determined').change(function() {
const dis = $(this).val() == 1 || $(this).val() == 2 || $(this).val() == 3;
$("input#headers, input#muffler, input#catalytic").prop("checked", false).prop("disabled", dis)
});
[ad_2]