jQuery:Fancybox使用Ajax在chrome中产生错误循环 [英] jQuery: Fancybox produces a loop of errors in chrome using ajax

查看:109
本文介绍了jQuery:Fancybox使用Ajax在chrome中产生错误循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的代码:

<a href="url" class="fancybox">Text</a>
jQuery(document).ready(function() {
    jQuery(".fancybox").fancybox({
        'overlayShow': true,
        'hideOnContentClick': false
    });
});

会显示该框,已加载内容,但在Chrome的错误控制台中显示为未捕获的TypeError:无法调用未定义的方法'width'."

The box is displayed, the content is loaded but in the error console of chrome "Uncaught TypeError: Cannot call method 'width' of undefined".

可以关闭该框,但是无法再次打开它.

The box can be closed but then it is not possible to open it again.

我正在使用FB 1.3.4和jQuery 1.5.1.

I am using FB 1.3.4 and jQuery 1.5.1.

推荐答案

我以前也遇到过同样的问题,原因是我正在将fancybox.1.3.4.js文件加载到fancybox加载的文件中首先.

Ive had this same problem before and the cause was that I was loading the fancybox.1.3.4.js file inside of the file that was getting loaded by fancybox in the first place.

如果您也这样做,那就是问题所在.否则我不知道.

If you are doing this as well, it will be the problem. Otherwise I do not know.

这篇关于jQuery:Fancybox使用Ajax在chrome中产生错误循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆