Simplemodal 多个对话框

发布于 2024-10-06 06:39:21 字数 121 浏览 0 评论 0原文

我正在使用 jquery simplemodal 插件,但我不确定使用此插件是否可以从另一个 simplemodal 对话框打开 simplemodal 对话框。有人知道这可能吗?

谢谢,

卢西奥

I'm using the jquery simplemodal plugin, but i'm not sure that with this plugin is possible open a simplemodal dialog from another simplemodal dialog. Someone knows is it possible?

Thanks,

Lucio

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

巨坚强 2024-10-13 06:39:21

SimpleModal 一次只允许打开一个模式。您可以交换内容或关闭然后重新打开新模式。

以下是如何使用后者的示例: http://jsbin.com/aqavo3/

单击“使用 JS 编辑” Bin”查看代码。

SimpleModal only allows one modal open at a time. You can swap the content or close then re-open a new modal.

Here's an example of how to the latter: http://jsbin.com/aqavo3/

Click "Edit using JS Bin" to view the code.

还如梦归 2024-10-13 06:39:21

不幸的是,最近我发现 JavaScript 中的变量实际上是全局的。

因此,考虑到这一点,只需保存 div 的内容并在必要时重新应用它即可。

当前内容 = $('#div').html();
...
...
...
...
...
$('#div').html(currentContent);

那行得通!我自己在我的一个应用程序(网站)中这样做。

I have, recently, found out that, unfortunately, variables in javascript are, actually, global.

So, with that in mind, simply save the contents of the div and re-apply it back if necessary.

currentContent = $('#div').html();
...
...
...
...
...
$('#div').html(currentContent);

That works! I do it myself in one of my applications (websites).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文