$(".agree-condition").text("I agree to receive information from CLAT Prep Education"); $(".reg_specialization_id_div").hide(); function hidefieldcc() { if (($("#CourseId").val() != "") && ($("#CourseId").val() == "474033" || $("#CourseId").val() == "432074" || $("#CourseId").val() == "432075" || $("#CourseId").val() == "458014" || $("#CourseId").val() == "1500017")) { $(".reg_specialization_id_div").show(); } else { $(".reg_specialization_id_div").hide(); $("#SpecializationId").prop("selectedIndex", 1).change(); } } $("#CourseId").change(function () { setTimeout(() =>{ hidefieldcc(); }, 400); });