How to disable other content based on two select option choices

If he wants to add channel, he should tick the checkbox and select channel. No other purpose

I don’t have the knowledge to do this. I will be glad if you help

I am using this code for checkboxes but i have detected a problem
It works fine as seen in the video on my page.
However, I used it for the test codes on the jsfiddle site, it didn’t work.
I don’t know what is the error

$("#analog").change(function(){
    $("#analog_channels").prop("disabled", $(this).is(':checked'));
    $("#analog_channels").prop('selectedIndex',0);
    $("#analog_channels option").prop('disabled', false);
});
$("#digital").change(function(){
    $("#digital_channels").prop("disabled", $(this).is(':checked'));
    $("#digital_channels").prop('selectedIndex',0);
    $("#digital_channels option").prop('disabled', false);
});

Thank you

Sponsor our Newsletter | Privacy Policy | Terms of Service