JS Filter Woof

 $('html').on('click', 'body', function(e) {
        $('.woof_container_inner h4').removeClass('active');
        $('.woof_container_inner h4').next().hide();
    });
    $('body').on('click', '.woof_block_html_items', function(e) {
        e.stopPropagation();
    });
    $('body').on('click', '.woof_container_inner h4', function(e) {
        e.stopPropagation();
        var open_filter = false;
        if ($(this).hasClass("active")) {
            open_filter = true;
        }
        $('.woof_container_inner h4').removeClass('active');
        $('.woof_container_inner h4').next().hide();
        if (open_filter) {
            $(this).removeClass('active');
            $(this).next().hide();
        }
        else{
            $(this).addClass('active');
            $(this).next().show();
        }         
    });

Leave a Reply

Your email address will not be published. Required fields are marked *