小编Ing*_*rie的帖子

标题中的Fancybox链接

我正在尝试在fancybox单个图像标题内建立一个链接.我希望它将我重定向到另一个内联的fancybox窗口.

我有一个脚本,使整个单个图像成为一个链接,但这是我的文档标题而不是锚标题...我真的希望有人会有一个解决方案或更好的想法如何做到这一点!谢谢!

顺便说一句:我几乎从未用脚本深入研究过......

$(document).ready(function() {
    $("a.fancybox").attr('rel', 'gallery').fancybox();

    $("a.fancylink").fancybox({
        'title': this.title,
        'titlePosition': 'over',
        'titleFormat': function() {
            return '<span id="fancybox-title-over" style="background: url();"></span>';
        },
        'onComplete': function() {
            goTo = this.title;
            $("#fancybox-title").css({
                'top':'0',
                'bottom':'0'
            }).bind('click', function() {
                $.fancybox.close();
                return document.location.href=goTo;
            });
        }
    });
});
Run Code Online (Sandbox Code Playgroud)

anchor title hyperlink fancybox

1
推荐指数
1
解决办法
1万
查看次数

标签 统计

anchor ×1

fancybox ×1

hyperlink ×1

title ×1