Fancybox navigation arrows not showing up

大兔子大兔子 提交于 2019-12-08 17:36:45

问题


I am a newbie to jquery. All animations like transitions and speed is working fine. However, 'showNavArrows' and 'cyclic' isn't working. Here's the code:

$(document).ready(function() {
    $("a#single_image").fancybox({
        'transitionIn'  :   'elastic',
        'transitionOut' :   'elastic',
        'speedIn'   :   600, 
        'speedOut'  :   200, 
        'overlayShow'   :   false,
        'cyclic'    :   true,
        'showNavArrows' :   true
    })
});

Here's the available options: http://fancybox.net/api


回答1:


Cyclic and navigation arrows only will show up if you have a group of elements in a gallery, which means that the elements of the gallery should have the same rel attribute check this post for examples




回答2:


If you use fancybox3 try data-fancybox="images" instead of rel="images"



来源:https://stackoverflow.com/questions/8929879/fancybox-navigation-arrows-not-showing-up

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!