I'm trying to implement a dependency between two different select boxes. While using the following jQuery code, most normal browsers would work perfectly (Chrome/FF) but IE/Edge/Some Mobile browsers won't be affected by the code.
jQuery(document).ready(function($){
$("#selectbox-dependency").change(function() {
if ($(this).val() == "Banana") { //value of selectbox #1
$(".yellow").show(); //classes for each of the options in selectbox #2
$(".red").hide();
$(".black").hide();
$(".gold").hide();
}else if ($(this).val() == "cherry"){
$(".yellow").hide();
$(".red").show();
$(".black").hide();
$(".gold").hide();
}
});
});
Thanks!