Hide something when use filter
Fri Apr 19 2024 20:03:25 GMT+0000 (Coordinated Universal Time)
Saved by
@Y@sir
#filter
#jetsmartfilters
https://gist.github.com/aalexandr21/23794f7473a46de2e024a2542afb3155
I added it here https://prnt.sc/5Oc1TgkXsaGc
And to listings that you need to hide, I added the CSS class hide_when_use_filter https://prnt.sc/XaE35kAG5Ddp
/**Snippet**/
jQuery(document).ready(function ($) {
document.addEventListener('jet-smart-filters/inited', function (initEvent) {
JetSmartFilters.events.subscribe('activeItems/change', function (activeItems) {
if (activeItems && activeItems.length >= 1) {
$(".hide_when_use_filter").slideUp();
}
else {
$(".hide_when_use_filter").slideDown();
};
});
})
});
content_copyCOPY
Hide something like div when use a filter.
Comments