【问题标题】:prettyPhoto stuck on load in modal windowprettyPhoto 卡在模态窗口中的负载上
【发布时间】:2014-04-22 20:11:41
【问题描述】:

我正在开发一个带有图库页面 (www.eastcoastglassnc.com/projects.hmtl) 的网站。我遇到的问题是模态窗口应该出现,但它卡在加载轮上。我知道这个问题可能是我忽略的,所以我想我会得到一双新的眼睛。这是我正在使用的代码。

缩略图 HTML:

<div class="box col5"><a href="style/images/projects/bbt/bbt1.jpg" data-gal="prettyPhoto" title=""><span class="overlay zoom"></span><img src="style/images/projects/bbt/thumb1.png" alt=""/></a></div>

JavaScript

$(document).ready(function(){
        $("a[data-gal^='prettyPhoto']").prettyPhoto({autoplay_slideshow: false, overlay_gallery: false, social_tools:false, deeplinking: false, theme:'pp_default', slideshow:5000, hook: 'data-gal'});
    });

jQuery

// Find out if the picture is part of a set
        theRel = $(this).attr('data-gal');
        galleryRegExp = /\[(?:.*)\]/;
        isSet = (galleryRegExp.exec(theRel)) ? true : false;

        // Put the SRCs, TITLEs, ALTs into an array.
        pp_images = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr('data-gal').indexOf(theRel) != -1) return $(n).attr('href'); }) : $.makeArray($(this).attr('href'));
        pp_titles = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr('data-gal').indexOf(theRel) != -1) return ($(n).find('img').attr('alt')) ? $(n).find('img').attr('alt') : ""; }) : $.makeArray($(this).find('img').attr('alt'));
        pp_descriptions = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr('data-gal').indexOf(theRel) != -1) return ($(n).attr('title')) ? $(n).attr('title') : ""; }) : $.makeArray($(this).attr('title'));

您的任何输入都会很棒!

【问题讨论】:

    标签: javascript jquery html prettyphoto


    【解决方案1】:

    你能安装firefox的“Firebug”插件,然后再次运行吗?

    (如果您可以将 Firebug 的“控制台”的输出放入票证中,那将很有帮助!)

    我尝试访问该页面,但模式消失了,单击图像只会导致图像,而不是漂亮的照片。 :(

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-05-10
    • 2013-12-22
    • 1970-01-01
    • 1970-01-01
    • 2021-05-19
    • 1970-01-01
    • 1970-01-01
    • 2015-11-18
    相关资源
    最近更新 更多