j edgar
j edgar

Reputation: 149

make flexslider change slide on hovering on thumbnails

I have a flexslider thumnial like this ; enter image description here

I want the slide to change when the user hover on thumbnails .How can I do so ?

This is the jquery code I'm using to create the slider:

$(window).load(function() {
    $('.flexslider').flexslider({
        animation: "slide",
        controlNav: "thumbnails",
        start: function (){
        }
    });
});

Thanks

Upvotes: 1

Views: 1149

Answers (1)

hsh
hsh

Reputation: 1855

You can call thumbnail img tag's click event inside the hover event handler using JQuery like this:

$(window).load(function() {
  $('.flexslider').flexslider({
    animation: "slide",
    controlNav: "thumbnails",
    start: function (){
    }
  });

  $(".flex-control-thumbs li img").hover(function(){
    $(this).click();
  });
});

Working Sample On Fiddle

hope that helps.

Upvotes: 2

Related Questions