javascript - Bootstrap: modal.js v3.2.0 Nested modal popup - Stack Overflow

I am new on Bootstrap.My Requirement is to open Modal Popup in a page. (Done).Open Modal Popup require

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
Add a ment  | 

1 Answer 1

Reset to default 6

Ah 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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742403815a4437438.html

相关推荐

  • javascript - Bootstrap: modal.js v3.2.0 Nested modal popup - Stack Overflow

    I am new on Bootstrap.My Requirement is to open Modal Popup in a page. (Done).Open Modal Popup require

    13小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信