$(document).ready(function() {
$('#bundlesubmit').click(function() {
if ($("#three").is(':checked')) {
$("#bundleDropDown1").toggle();
alert ('hey this is the three only one');
}
if ($("#two").is(':checked')) {
$("#bundleDropDown2").toggle();
alert ('hey this is the second one');
}
if ($("#two").is(':checked') == true && $("#three").is(':checked') == true) {
$("#bundleDropDown").toggle();
alert ('hey this is the two options');
}
});
});
그래서 인터넷을 통해 답변을 검색했지만 아무 것도 찾을 수 없었습니다! 코드가 작동하지만 사람이 두 개의 확인란을 선택하면 해당 기능을 수행하고 단일 확인란의 기능을 수행합니다.표시 확인란을 선택한 특정 확인란 JQUERY
#TWO 및 #THREE를 선택하면 모든 기능을 수행합니다. 두 항목 모두 하나의 기능 만 실행하도록 선택되었는지 어떻게 알 수 있습니까?
당신의 관련 HTML 구조는 무엇입니까? –