Facebox只能使用一次 [英] Facebox only works once

查看:219
本文介绍了Facebox只能使用一次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

绑定我的Facebox请求文档在Facebox网站上的说明。

Am binding my Facebox requests just how the documentation says on the Facebox website.

但是点击其中一个div.com后,Facebox请求不起作用再次。

But after I click one of the div.comment's the Facebox request doesn't work again.

我使用的代码就在下方,我的错误更进一步。

The code I am using is just below and further down is my error.

$(document).ready(function() {
    $('.comment').bind('click', function() {
        $.facebox({ajax: '/project/cake_app/comment/tweets/' + $(this).attr('id')});
    }); 
});

错误:

Uncaught TypeError: Object function (a,b){return new d.fn.init(a,b,g)} has no method 'facebox'


推荐答案

我通过从Facebox切换到Fancybox解决了我的问题,看来他们是Facebox的一个错误,它解除了事件的绑定使用一次后。

I solved my problem by switching from Facebox to Fancybox, it seems their is a bug with Facebox that is unbinding the event after it is used once.

这篇关于Facebox只能使用一次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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