Home Forums WoodMart support forum Query from other developer

Query from other developer

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #31801

    leonidas
    Participant

    Hello
    I am forwarding a query from a plugin developer:

    “Dear Developer,

    I am using some custom hover effect on the shop thumbnails of this theme. The effect uses JavaScript code. Now when we switch to different product grid view, the effect no longer works. I would like to know if any event is triggered when switching the product grid view, so that I can use that event for triggering the hover effect again when products are loaded in grid. Kindly let me know the event name and DOM element on which event is triggered.”

    Regards

    #31810

    Artem Temos
    Keymaster

    Hello,

    Thank you for your message. Unfortunately, there is no such event at the current version of our theme. We will add it to the next theme update that will be released next week and add this information to the changelog.

    Regards

    #31817

    leonidas
    Participant

    Thank you for your reply.I Will wait then for the next version.
    Regards

    #31827

    Artem Temos
    Keymaster

    You are welcome!

    #32681

    leonidas
    Participant

    Hi,
    do you think after the latest update you can share the answer to my query so I can forward it to my plugin developer?
    Regards

    #32721

    Artem Temos
    Keymaster

    Hello,

    Your developer can add custom callbacks after our ajax is complete using this event

    jQuery(document).on('pjax:complete', function() {
    
    });

    Regards

    #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.”

    #33167

    Artem Temos
    Keymaster

    Our code works correctly, but your developer’s one is wrong. He can change our part with the following snippet if he knows JS well

    jQuery(function($) {
            // Enable overlay when products loaded with ajax
            $(document).on('pjax:complete', function() { 
                 alert('pjax complete');
            });        
        });
    #33451

    leonidas
    Participant

    You can close the ticket

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘Query from other developer’ is closed to new replies.