나는 여기에 jQuery 코드를 가지고 :, 그렇지 않으면 작동합니까?
jQuery(document).ready(function() {
$("td").click(function (e) {
var chk = $(this).closest("tr").find("input:checkbox").get(0);
if (e.target != chk) {
chk.checked = !chk.checked;
}
if ($(this).closest("tr").find("input:checkbox").is(":checked")) {
$(this).closest("tr").css("font-weight", "bold");
} else {
$(this).closest("tr").css("font-weight", "");
}
});
});
내가이 확인란 많이 클릭에 어떤 td
에 체크 그리고 추가 CSS를 볼 수 있듯이.
잘 작동합니다. 내가 원하는 것은 상자가 많은 select
상자가있는 것과 같은 형태입니다.
뭔가를 선택하려고하면 기능이 작동합니다.
확인란을 선택하지 않으려면 선택 상자를 클릭하여이 기능을 비활성화하고 싶습니다.
감사합니다. 잘 작동합니다.^_ ^ –