Home Forums WoodMart support forum Query from other developer Reply To: Query from other developer

#33152

leonidas
Participant

Hello
look at the video.
I have activated a dark layer every time the user hover a product.
The problem is that when the user changes the layout from grid to list that dark layer doesn’t activate again.
I am forwarding a query from my developer after he embed the code you’ve send me:

”  jQuery(function($) {
        // Enable overlay when products loaded with ajax
        $(document).on(‘pjax:complete’, function() {
            $(‘.woodmart-hover-base, .with-username, .woodmart-search-dropdown, .woodmart-navigation .item-level-0.menu-item-has-children, .menu-item-my-account.logged-in, .woodmart-header-links > ul > li.menu-item-my-account, .search-button’).hover( function() {
                $(‘.body-mask’).toggleClass(‘active-mask’);
            });
        });        
    });

The line $(document).on(‘pjax:complete’, function() { is suggested by the developer, and the inner code is for the hover effect of body mask. If the inner code is not working, may be it is because the event is not triggered. You will need to forward this code to the theme developer to check.”