I am facing an issue with smooth transitions between thumbnail images in HTML list tags. I have Jquery listeners set up for mouseenter and mouseleave events that update a parent image when a thumbnail is hovered over.
The problem arises when scrolling from one thumbnail to another - there is a noticeable jump in the parent image when the cursor is in the 5 pixel spacing. It quickly reverts to its default value before displaying the next thumbnail upon hover.
Is there a way to achieve a smoother transition between images without reverting back to the default parent image?
I attempted to use padding instead of spacing, but this affected the design due to borders around the images.
Any help or suggestions would be greatly appreciated!
EDIT: Can anyone provide assistance with the code used for this functionality?
$image_changer = $('.imageChanger');
$image_changer.each(function(){
$(this).mouseenter(function(){
$backup_old_image = $('.product-img-box .product-image img').attr('src');
$('.product-img-box .product-image img').attr('src', $(this).attr('src'));
});
});
$image_changer.mouseleave(function(){
$('.product-img-box .product-image img').attr('src', $backup_old_image);
});
You can view an example on the product page at: