Currently, I am facing an issue where changing the value of the first dropdown also changes the value of the second dropdown. How can I resolve this issue?
I want to ensure that when I change the value of the first dropdown, the second dropdown does not inherit the same value.
The code snippet is provided below:
$(".nf-default-opt").click(function() {
$(this).parent().toggleClass("nf-active");
})
$(".nf-opt-ul .nf-li").click(function() {
var currentSelected = $(this).html();
$(".nf-default-opt .nf-li").html(currentSelected);
$(this).parents(".nf-select-c").removeClass("nf-active");
})
Any assistance on fixing this would be greatly appreciated!