Home › Forums › WoodMart support forum › Single Product – Image Change on Hover
Single Product – Image Change on Hover
- This topic has 5 replies, 2 voices, and was last updated 9 months, 2 weeks ago by
Hung Pham.
-
AuthorPosts
-
May 21, 2024 at 12:41 pm #567140
theinnovatorssrlParticipantHello,
I would like to change the main image on sigle product on the mouse is on the thumbnail.
So it have to change on the hove on the thumbnail.Something simillar like on amazon single product pag.
Also I want to make the thumbnail small around 38×38 px.For the hover image change I used the following code On Document Ready JS but it did not worked:
jQuery(document).on(‘mouseenter’, ‘.product-image-thumbnail:not(.active-thumb)’, function(){
var $thumbsOwl = jQuery(‘.images .thumbnails’);
var $mainOwl = jQuery(‘.woocommerce-product-gallery__wrapper’);
var i = jQuery(this).parent().index();
$thumbsOwl.trigger(‘to.owl.carousel’, i);
$mainOwl.trigger(‘to.owl.carousel’, i);
});Can you help me with this workaround>
May 22, 2024 at 9:13 am #567386
Hung PhamKeymasterHi theinnovatorssrl,
Thanks for reaching to us.
Unfortunately, there is no such an option right now and customization is out of basic support.
You can create a ticket here: https://woodmart.canny.io/feature-requests so our developers will consider such a feature.
Regards,
May 22, 2024 at 10:52 am #567438
theinnovatorssrlParticipantHello,
I found this code in the response at the another ticket from other customer and for him code provided by you worked.
So can you help me to find out why it is not working on my website please?
jQuery(document).on(‘mouseenter’, ‘.product-image-thumbnail:not(.active-thumb)’, function(){
var $thumbsOwl = jQuery(‘.images .thumbnails’);
var $mainOwl = jQuery(‘.woocommerce-product-gallery__wrapper’);
var i = jQuery(this).parent().index();
$thumbsOwl.trigger(‘to.owl.carousel’, i);
$mainOwl.trigger(‘to.owl.carousel’, i);
});May 23, 2024 at 11:45 am #567691
Hung PhamKeymasterHi theinnovatorssrl,
1. The old one doesn’t work because we changed the carousel library. Please add the following code snippet to the custom JS on document ready in Theme Settings
jQuery(document).on('mouseenter', '.wd-gallery-thumb .wd-carousel-item:not(.wd-thumb-active)', function(){ var $mainCarousel = jQuery('.woocommerce-product-gallery__wrapper'); var i = jQuery(this).index(); if($mainCarousel[0].swiper) { $mainCarousel[0].swiper.slideTo(i); } });
2. You can create a ticket here: https://woodmart.canny.io/feature-requests so our developers will consider such a feature. And in the future we may add this functionality to our theme. As it is very convenient.
Regards,
May 23, 2024 at 3:34 pm #567805
theinnovatorssrlParticipantIt worked perfect!
Thank you very much!
May 24, 2024 at 8:47 am #567910
Hung PhamKeymasterHi theinnovatorssrl,
Glad to hear your issue has been resolved. Keep us in mind for future questions and concerns, we’re always here to help!
If you have a quick minute we always appreciate a 5-star rating on our theme!
https://themeforest.net/item/woodmart-woocommerce-wordpress-theme/reviews/20264492
Your feedback is the motivation to improve our work and services.
Regards,
-
AuthorPosts
The topic ‘Single Product – Image Change on Hover’ is closed to new replies.
- You must be logged in to create new topics. Login / Register