5👍
✅
There were some mistakes in your code. Here it is corrected :
var species = $("#id_species_param");
var organs = $("#id_organs_param");
function refreshOptions() {
if (species.val() === "human") {
organs.attr("disabled", true);
} else {
organs.attr("disabled", false);
};
}
refreshOptions();
species.on("change", refreshOptions);
Check it live : jsfiddle
Source:stackexchange.com