Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
331 views
in Technique[技术] by (71.8m points)

javascript - Bootstrap 3 - open modal from another modal

Is it possible in Bootstrap 3 to open modal from another modal? I have modal windows with content loaded from external html files.

  1. I'm opening the modal window. There I have a form to submit.
  2. After clicking the submit button I would like to go to the next step with a new modal window (and a new content from another html file).

As far as I know you can't have two modal windows simultaneously, so I have to close the first modal and then open the second one. The problem is I have to do after clicking the submit button in the first modal.

I've tried to use the data-dismiss="modal" with data-toggle="modal" attributes on the submit button but they only hide the first modal, the background in still dark and nothing happens.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

you can use http://jschr.github.io/bootstrap-modal/bs3.html for that; check stackable example.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...