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>

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.

如果您能提出任何解决这个问题的建议,我将不胜感激.

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

我正在使用Bootstrap版本3.0.

Edit: I guess it's neccesary to reduce the time of fading out a modal. How is this possible?

推荐答案

data-dismiss makes the current modal window f或ce close

data-toggle打开了一个包含href内容的新模式

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

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

do let us know if it w或ks.

Jquery相关问答推荐

JQuery:$.get 不是函数

在正则表达式字符括号中包含连字符?

如何使用 JQuery Select 没有特定子元素的元素

提醒未保存的表单更改

如何使用 jQuery 清空输入值?

如何从 jQuery 中的父级中 Select 所有子级(任何级别)?

jQuery UI 滑块(以编程方式设置)

如何知道字体(@font-face)是否已经加载?

使用 jQuery 刷新(重新加载)页面一次?

Bootstrap 3.0 弹出框和工具提示

jQuery XML 错误请求的资源上不存在‘Access-Control-Allow-Origin’标头.

如何使用 jQuery 停止默认链接点击行为

jquery: $(window).scrollTop() 但没有 $(window).scrollBottom()

如何通过jQuery函数仅获取直接子元素

如何防止使用光标拖动 Select 文本/元素

JavaScript 中的简单节流阀

使用 JQuery 的黄色淡入淡出效果

$.ajax 的成功和 .done() 方法有什么区别

将变量的值复制到另一个

jQuery中的wait()或sleep()函数?