본문 바로가기
javascript

FAQ 형식 slide Toggle

by 바나냥 2020. 4. 4.
var thisRsvnList = $(this).closest('.rsvn-list');
$('.rsvn-list').not(thisRsvnList).removeClass('on');
thisRsvnList.hasClass('on') ? thisRsvnList.removeClass('on') : thisRsvnList.addClass('on');

var thisToggle = $(this).closest('.rsvn-list').find('.room-toggle');
$('.rsvn-list').find('.room-toggle').not(thisToggle).slideUp();
thisToggle.slideToggle();

댓글