admin管理员组文章数量:1336085
I am new on Bootstrap.
- My Requirement is to open Modal Popup in a page. (Done).
- Open Modal Popup required to open another Modal Popup. (Done).
Facing Issue :
When I goes to close the nested (Second) Modal Popup, both popup is closed at a time. Because I Use "data-dismiss='modal'" to close the modals. is there any other way to close Nested Modal Popup.
I am new on Bootstrap.
- My Requirement is to open Modal Popup in a page. (Done).
- Open Modal Popup required to open another Modal Popup. (Done).
Facing Issue :
When I goes to close the nested (Second) Modal Popup, both popup is closed at a time. Because I Use "data-dismiss='modal'" to close the modals. is there any other way to close Nested Modal Popup.
Share edited May 28, 2015 at 14:10 amphetamachine 30.7k12 gold badges67 silver badges74 bronze badges asked Nov 11, 2014 at 9:33 Jignesh PatelJignesh Patel 4475 silver badges16 bronze badges 1-
Did the modals have different
id's
? Can you please add your nested modals code? – Jordi Castilla Commented Nov 11, 2014 at 9:37
1 Answer
Reset to default 6Ah now I understand! You'll need to close your modal using javascript then :) I've written a little function here. Just add the "closeModal" class to the button which you want to close the modal for.
Basically it finds the parent modal that the button belongs to and closes that modal. Hopefully this helps and you can change it around if needs be.
$(".closeModal").click(function(){
$(this).closest(".modal").modal("hide")
});
http://jsfiddle/kjazcz5e/4/
Bootstrap provides a .modal() JQuery plugin to let you control modals. Take a look: http://getbootstrap./javascript/#modals
本文标签: javascriptBootstrap modaljs v320 Nested modal popupStack Overflow
版权声明:本文标题:javascript - Bootstrap: modal.js v3.2.0 Nested modal popup - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742403815a2468410.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论