2

i tried to add a zoom function (glass effect) on images in the bootstrap carousel. I want to stop the carousel when we hover on an image. I have tested many codes and solutions whithout success. Here is a first code :

            // Carousel don't stop on hover
            // The zoom effect is working
            $('.carousel .item').on('mouseover',function(){
                $(this).find('img').lightzoom();
                $('.carousel').carousel('pause');
            }) .mouseout(function() {
                $('.carousel').carousel('cycle');
            });

Here is a seconde code :

            // Carourel is stopping with a hover on image / slide
            // The zoom effect is working
            // But when we quit the carousel, cycle of carousel is broken 
            $('.carousel').hover(
                function() {
                    $(this).find('img').lightzoom();
                    $(this).carousel('pause');
                }
            );

How can I combine the hover and the zoom functions on the carousel? Is there a possibility to achieve this? Thanks for your help.

user28220
  • 79
  • 8

0 Answers0