HUSKY - Products Filter Professional for WooCommerce

How to make toggle button include the title as well as the toggle icon

Open file footer.php and add there next JavaScript code:

<script>
window.addEventListener('load', (e) => {
        document.querySelectorAll('.woof_container_inner h4').forEach(function (h) {
            if (h.querySelector('a.woof_front_toggle')) {
                h.style.cursor = 'pointer';
                h.addEventListener('click', function (e) {
                    h.querySelector('a.woof_front_toggle').click();
                    return false;
                });

            }
        });
    });
</script>

Also you can use hook wp_footer. Open file functions.php of the current WordPress theme and there next code:

add_action('wp_footer', function() {
    ?>
    <script>
        window.addEventListener('load', (e) => {
            document.querySelectorAll('.woof_container_inner h4').forEach(function (h) {
                if (h.querySelector('a.woof_front_toggle')) {
                    h.style.cursor = 'pointer';
                    h.addEventListener('click', function (e) {
                        h.querySelector('a.woof_front_toggle').click();
                        return false;
                    });

                }
            });
        });
    </script>
    <?php
});

 

 


Troubles? Ask for Support!