I'm working on a project in Rails, where in a view project I have several comboBox, where at first I would like only one to be enabled, and according to the selected value the others are released. I think it would be interesting to use JavaScript or / with jQuery to do this, but I have little knowledge in both. Does anyone tell me how to do it? A light so I can follow?
Here is the code I tried, but it did not work:
var update_field = function () {
if ($(".card") == 'Spell') {
$('.cardFamily').prop('disabled', false);
} else {
$('.cardFamily').prop('disabled', 'disabled');
}
};
$(update_field);