Home › Forums › WoodMart support forum › Query from other developer
Query from other developer
- This topic has 8 replies, 2 voices, and was last updated 7 years, 1 month ago by
leonidas.
-
AuthorPosts
-
January 6, 2018 at 11:04 am #31801
leonidasParticipantHello
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
January 6, 2018 at 4:13 pm #31810
Artem TemosKeymasterHello,
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
January 6, 2018 at 5:31 pm #31817
leonidasParticipantThank you for your reply.I Will wait then for the next version.
RegardsJanuary 6, 2018 at 6:25 pm #31827
Artem TemosKeymasterYou are welcome!
January 10, 2018 at 7:52 pm #32681
leonidasParticipantHi,
do you think after the latest update you can share the answer to my query so I can forward it to my plugin developer?
RegardsJanuary 11, 2018 at 7:22 am #32721
Artem TemosKeymasterHello,
Your developer can add custom callbacks after our ajax is complete using this event
jQuery(document).on('pjax:complete', function() { });
Regards
January 12, 2018 at 11:47 am #33152
leonidasParticipantHello
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.”
January 12, 2018 at 12:47 pm #33167
Artem TemosKeymasterOur 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'); }); });
January 14, 2018 at 4:26 pm #33451
leonidasParticipantYou can close the ticket
-
AuthorPosts
The topic ‘Query from other developer’ is closed to new replies.
- You must be logged in to create new topics. Login / Register