jQuery-Shadowbox重新绑定 [英] jQuery - Shadowbox rebinding

查看:114
本文介绍了jQuery-Shadowbox重新绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用AJAX将Shadowbox绑定/初始化到jQuery加载的内容?
现在,shadowbox在我第一次进入该网站时就可以使用.

How do I bind / initialize Shadowbox to content loaded by jQuery using AJAX?
Right now shadowbox works when I first come into the site.

但是,当我将内容与通过AJAX加载的新内容交换时,这些新的内容批处理不会弹出影子框,而是会重定向到该内容.

However, when I swap the content with a new one loaded through AJAX, these new batch of content doesn't do the shadowbox popup, instead it just redirect to the content.

我有Shadowbox.init(shadowbox_conf);成功,但似乎没有成功.

I have Shadowbox.init(shadowbox_conf); in the success but it doesn't seem to do the trick.

谢谢,
三通

推荐答案

我刚刚找到了解决方法.

Ah I just found the solution.

Shadowbox.init不能被调用2次.

Shadowbox.init can't be called 2 times.

所以请改用它.
Shadowbox.setup();

So use this instead.
Shadowbox.setup();

谢谢,
三通

这篇关于jQuery-Shadowbox重新绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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