如何获得尝试加载但无法加载的 Fancybox 错误或图像 href?



标题中已经有问题了

下面是代码:

(function($){
        var filter = /(.*)(.jpg|.png|.gif|.bmp)$/i;
        $('a > img').each(function(){
            var href = $(this).parent().attr('href');
            if ( filter.test(href) ){
                $(this).fancybox({
                    transitionIn:'fade',
                    transitionOut:'fade',
                    overlayShow:true,
                    overlayOpacity:0.7,
                    overlayColor:'#e8f1fa'
                });
            }
        });
    })($);

所以,正如你所看到的,目的是在序列"a> img"上设置一个花哨的盒子,其中"a "标签在图像上有链接。

这里是一个问题的地方:http://factorial.wispo.ru/novosti/skoro-budet-sajt.html

答案很简单——它需要在"A"标签上指定fancybox。所以,有一个修复:$(this).parent(). fanybox(…感谢focus and HAD

最新更新