Home Forums WoodMart support forum Single product – on click change picture

Single product – on click change picture

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #265426

    bubostyle
    Participant

    Hello,

    my client wants in single product page that if he came with mouse on picture thumbnail he dont need to click thumbnail picture for change the main one. He wants that picture change at the time when u came with mouse on different thumbnail. Is there any possibility to change this thing?

    #265448

    Hello,

    You will have to change the layout of the images in the Theme settings > Product page > Images.

    Best Regards

    #265457

    bubostyle
    Participant

    Problem still not solved. If i change the layout its still the same – i have to click on picture for change.

    When my mouse is on thumbnail i want to show picture on which is mouse without clicking on it

    #265612

    Hello,

    Please add this code to the Theme Settings > Custom JS > On document ready:

    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);
    });

    Best Regards

    #265641

    bubostyle
    Participant

    Great! It works. Thanks a lot for this because i tried something like this, but it didnt works:

    document.querySelectorAll(‘.owl-stage’)[1].childNodes.forEach(item => {
    item.childNodes[0].childNodes[0].addEventListener(‘mouseenter’, (event) => {
    console.log(event)
    item.childNodes[0].childNodes[0].click()
    item.childNodes[0].click()
    item.click()

    })`

    })

    console.log(flexslider)`

    #265664

    You are welcome! If you have any questions please feel free to contact us.

    Best Regards

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

The topic ‘Single product – on click change picture’ is closed to new replies.