How to integrate an image gallery made with Roundabout with Fancybox?

后端 未结 2 1112
梦谈多话
梦谈多话 2021-01-22 10:06


I am trying to create a compact image gallery using the Roundabout plugin.

The carousel should rotate the thumbnails and, only for the image currently on focus,

2条回答
  •  没有蜡笔的小新
    2021-01-22 10:52

    ok, after inspecting the page you have mentioned, the focus image have roundabout-in-focus class so following may resolve this issue. try it

    $(function() {
        $('ul.image-gallery').roundabout({
            duration: 1200
        });
        //$('ul.image-gallery .roundabout-in-focus a').fancybox();
    });
    

    Edit: try to map the click event of focused image link and open fancybox manually for link url. Also remove fancybox mapping in above function. (I've commented it in code)

    $('ul.image-gallery .roundabout-in-focus a').live('click',function(event){
    event.preventDefault();
    $.fancybox({'href':$(this).attr('href')});
    })
    

提交回复
热议问题