2
I have a modal of bootstrap
where there is a button that closes the modal
but I wanted as soon as I closed the modal, to open another. I tried to put one id
button to open the modal again but it is not working.
This is what I got
<div id="fullCalModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-footer" style="margin-top:0;">
<button type="button" class="btn btn-success" id="open">Inscrever-me nesta aula!</button>
<button type="button" class="btn btn-info" data-dismiss="modal">Fechar</button>
</div>
</div>
</div>
</div>
<div id="fullCalModal2" class="modal fade">
//Texto complementar com divs
</div>
To open the first modal, I open by clicking on a event
of FullCalendar
, and the other externally.
$("#open").click(function(){
$("#fullCalModal2").modal();
});
Why don’t you open the other modal by clicking on the close?
– adventistaam
This Calendar has the close button with id or class?
– adventistaam
@adventistaam What supposedly opens another modal is only if the user wants to sign up and the other is just to close the modal
– I_like_trains
@adventistaam In fullCalendar, it’s like this
$('#fullCalModal').modal();
– I_like_trains
@adventistaam I’m sorry the code posted was outdated, see now
– I_like_trains
in the
fullCalModal2
have the buttons identified? ID or Class?– adventistaam
@adventistaam You’re right, it was just a mistake. There were two buttons with the same id and I was always changing the wrong button. Post your answer that you are correct.
– I_like_trains
@I_like_trains is to open the second modal from the event click some button, or after closing the first opens the second?
– novic