Skip to content

Instantly share code, notes, and snippets.

@LesykJulia
Created October 17, 2022 13:41
Show Gist options
  • Save LesykJulia/e9f7c3697e01957fe13819b6a27161af to your computer and use it in GitHub Desktop.
Save LesykJulia/e9f7c3697e01957fe13819b6a27161af to your computer and use it in GitHub Desktop.
Make JetSmartFilters Expandable & Vice Versa
<style>
.jet-filter-label:after {
content: "˅";
float: right;
margin-right: 10px;
}
.jet-filter-label.noicon:after{
content: "";
}
.jet-filter-label {
cursor: pointer;
}
.jet-filter-label.noicon {
cursor: pointer;
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function() {
jQuery(function($){
$('.jet-checkboxes-list').slice(0).slideUp();
$('.jet-filter-label').click(function(){
$(this).next().slideToggle();
if (!$(this).hasClass('noicon')){$(this).addClass('noicon');}
else {
$(this).removeClass('noicon');
}
});
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment