thickbox - 关闭thickbox并再次打开它

标签 thickbox

我正在尝试使用thickbox做一个向导,第一次打开它时效果很好。当我单击下一步时,我想关闭我打开的 div 并在thickbox 中打开一个新的 div,但它是如何完成的?我已经尝试了以下代码,但它只是关闭了thickbox并且不会再次打开它:

tb_show("", "#TB_inline?height=280&width=620&inlineId=divStart", "");
tb_remove();
tb_show("", "#TB_inline?height=280&width=620&inlineId=divContinue", "");

最佳答案

您可以使用此代码:

//不要使用tb_remove()函数

$("#TB_window").remove();
$("body").append("<div id='TB_window'></div>");
tb_show("", "#TB_inline?height=280&width=620&inlineId=divContinue", "");

如果您使用 iframe 加载内容:
var p = parent;
p.$("#TB_window").remove();
p.$("body").append("<div id='TB_window'></div>");
p.tb_show("", "#TB_inline?height=280&width=620&inlineId=divContinue", "");

关于thickbox - 关闭thickbox并再次打开它,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/676609/

相关文章:

javascript - 当用户单击弹出窗口表面之外的页面上的任意位置时,如何关闭动态添加的弹出窗口?

jQuery 厚盒 : Close lightbox from the event of the iframe page content

jquery - Thickbox 和 Google map 链接

javascript - 如何从表单中打开 Thickbox 并为其提供数据?

javascript - 使用 document.getElementById 获取 url 中的输入值

javascript - thickbox javascript 函数

javascript - Thickbox 关闭按钮在每次点击后增加

html - 提交后自动返回结果页面

html - Thickbox 3.1 IE8 滚动问题