//개인정보 모두 체크
$('#f_all').on('click', function () {
let chkAll = $('input[type="checkbox"]');
if ($("#f_all").prop("checked")) {
chkAll.prop("checked", true);
} else {
chkAll.prop("checked", false);
}
});
//개인정보 부분 체크
$('.chk input[type="checkbox"]').on('click', function () {
$('#f_all').prop('checked', false);
let chk = $('.chk').length;
let chkInput = $('.chk input[type="checkbox"]:checked').length;
if (chk == chkInput) {
$('#f_all').prop('checked', true);
}
});
728x90
반응형
'IT > UI | UX' 카테고리의 다른 글
[피그마] 퍼블리셔가 피그마 사용하기 (0) | 2024.01.23 |
---|---|
IE11 굿빠이 (0) | 2021.05.31 |
[UI] setTimeout과 clearTimeout 활용 (0) | 2020.08.24 |
[UI] 제이쿼리 UI 사용해서 직소퍼즐 만들기 (0) | 2020.08.24 |
[UI] 헤더 nav 언더라인 따라다니기 (0) | 2020.08.20 |