Reputation: 384
I'm trying to achieve the effect on bootstrap that when new modal is opening the previous one will be hidden. I couldn't find good solution to this problem.
$('.show_second_modal').click(function (){
$('#first_modal').modal('hide').on('hidden.bs.modal', function (){
$('#second_modal').modal('show');
});
});
Here are my attempts: jsfiddle
Upvotes: 2
Views: 50
Reputation: 10453
I've removed the javascript and updated the targets for the modals.
Also when you close the register it returns to the login
http://jsfiddle.net/5kohnxe2/4/
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#register_modal">Anuluj</button>
Upvotes: 1
Reputation: 8110
Please verify your markup again: your form
closing tags are placed between div tags like this:
<form ...>
...
<div>
...
</form>
</div>
...
I've updated demo, now looks ok.
Upvotes: 2