【问题标题】:Trouble using thumbnail helper Fancybox使用缩略图助手 Fancybox 时遇到问题
【发布时间】:2013-02-01 15:12:30
【问题描述】:

目前使用 Fancybox 在此 prototype 上显示灯箱画廊

我在触发 Fancybox(包括缩略图助手)时使用以下 jQuery,但无法显示它们。有什么想法吗?

$(document).ready(function () {
    $(".fancybox").fancybox({
        type: "image",
        helpers: {
            title: {
                type: 'inside'
            },
            buttons: {},
            thumbs: {
                width: 50,
                height: 50
            }
        },
        afterLoad: function () {
            this.title = '' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
        }
    });
});

【问题讨论】:

    标签: jquery fancybox thumbnails


    【解决方案1】:

    您知道您还必须包含 fancybox-thumbs .js 和 .css 文件吗?喜欢:

    <link rel="stylesheet" href="./helpers/jquery.fancybox-thumbs.css" type="text/css" media="screen" />
    <script type="text/javascript" src="./helpers/jquery.fancybox-thumbs.js"></script>
    

    ....(检查您是否设置了正确的路径)否则您将永远无法使它们工作。

    它们位于下载的子目录helpers/ 下。

    【讨论】:

    • 嘿,哇,我以为它包含在 Fancybox 的缩小版中。我去看看,谢谢!
    • 这也让我感到困惑 - 完全错过了拇指和按钮的附加文件!除非辅助文件包含在主要的 fancybox 中,否则两者都不起作用!
    猜你喜欢
    • 2012-02-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-10
    • 2018-06-19
    • 2012-07-24
    • 2014-05-28
    相关资源
    最近更新 更多