• Resolved Christophe Tiget

    (@chris3872)


    Hello I try to display the divi woocommerce shop module only when a filter is checked on a page, but I can’t figure out how to do that?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author RazyRx

    (@razyrx)

    Hello,

    Please check this video to setup Divi Builder correct https://www.youtube.com/watch?v=4tkVYBelPKY

    Regards,
    Oleg

    Thread Starter Christophe Tiget

    (@chris3872)

    Thank you @razyrx I just solve my problem with a bit of code:

    <script>
    jQuery(document).ready(function($) {
        var resultsSection = $('#section-id'); // replace 'section-id' with ID of the section where the filter display.
        
        if (resultsSection.length) {
            // Cache la section des résultats par défaut
            resultsSection.hide();
            
            // Surveille les modifications apportées à la section des filtres
            $(document).on('DOMNodeInserted', '.berocket_single_filter_widget_253183', function() {
                // Si un filtre est appliqué, affiche la section des résultats
                if ($('.berocket_single_filter_widget_253183 input:checked').length > 0) {
                    resultsSection.show();
                    
                    $('html, body').animate({
                        scrollTop: resultsSection.offset().top
                    }, 1000);
                } else {
                    // Sinon, masque la section des résultats
                    resultsSection.hide();
                }
            });
        }
    });
    </script>
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘be rocket and Divi theme’ is closed to new replies.