Bootstrap:在Modal中打开另一个模态 [英] Bootstrap: Open Another Modal in Modal

查看:170
本文介绍了Bootstrap:在Modal中打开另一个模态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我正在使用此代码在当前打开的模态窗口中打开另一个模态窗口:

So, I'm using this code to open another modal window in a current opened modal window:

<a onclick=\"$('#login').modal('hide');$('#lost').modal('show');\" href='#'>Click</a>

会发生的情况是,对于类似500ms的滚动条将会复制。我猜是因为目前的模态还在逐渐淡出。然而,它看起来非常不平滑和口吃。

What happens is, that for like 500ms the scrollbar will duplicate. I guess because the current modal is still fading out. However it looks very un-smooth and stuttering.

我将不胜感激任何解决此问题的建议。

I would appreciate any suggestions to solve this issue.

另外,在onclick-event unprofessional中建立这个的方式是什么?

Also, is the way building this in an onclick-event unprofessional?

我正在使用bootstrap 3.0版。

I'm working with the bootstrap version 3.0.

编辑:我想减少淡出模态的时间是必要的。这怎么可能?

推荐答案

data-dismiss 使当前模态窗口强制关闭

data-dismiss makes the current modal window force close

data-toggle 打开一个带有 href 里面的内容

data-toggle opens up a new modal with the href content inside it

<a data-dismiss="modal" data-toggle="modal" href="#lost">Click</a>

<a data-dismiss="modal" onclick="call the new div here">Click</a>

请告诉我们是否有效。

这篇关于Bootstrap:在Modal中打开另一个模态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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