<!-- Добавить кнопку «Свернуть» к фильтрам магазина в мобильной версии | https://necodim.ru/tilda/mobile-shop-filters -->
<script>
$(function() {
setTimeout(function() {
$('.t-store__filter__options').append(`<div class="t-store__filter__item js-store-filter-item t-descr t-descr_xxs"><div class="collapse">Свернуть ↑</div></div>`)
$('.t-store__filter__options .collapse').click(function() {
$('.js-store-filter-mob-btn.active').click();
});
}, 1000)
});
</script>
<style>
.t-store__filter__options .collapse {
cursor: pointer;
}
@media screen and (max-width: 966px) {
.t-store__filter__item:last-child, .t-store__filter__item.t-store__filter__item_sort-mobile:last-child {
border-bottom: none !important;
}
}
@media screen and (min-width: 967px) {
.t-store__filter__item + .t-store__filter__item .collapse {
display: none;
}
}
</style>