Есть несколько блоков такой структуры, но с разным контентом
<div class="filter-section allow-multiple-expanded expanded">
<header>
<span class="text">Наличие:</span>
<button type="button" class="btn-expand"></button>
</header>
<div class="expand-content">
<label class="checkbox-styled">
<input type="checkbox" value="Y" name="arrFilter_3041_2254365807" id="arrFilter_3041_2254365807" onclick="smartFilter.click(this)"/>
<span class="checkbox-content">
<i class="flaticon-check14"></i>
В наличии
</span>
</label>
</div>
</div>
Скажите пожалуйста как изменить скрипт, чтобы при нажатии на .btn-expand закрывался/открывался .expand-content именно того блока на который было нажато? (в данном случае это происходит со всеми блоками такого класса)
$('.btn-expand').live('click', function(event) {
$('.expand-content').toggle('show');
});
$(this).closest(".filter-section").find(".expand-content").toggle("show");