#73 jQueryを使わないでアコーディオンUIを作る
ちなみにjQueryで作るとこんな感じ
$('.accordion').each(function(){ $(this).on('click', function(e){ e.preventDefault(); $(this).siblings('.accordion').removeClass('active'); $(this).toggleClass('active'); });});
Vanilla.jsで作る場合、siblings 兄弟要