In my current project i have a link that opens modal with login form inside. When user enters wrong credentials then I reload page and show again login modal with errors. Currently I am using following code to show modal on page load:
$(function() {
$('#login-modal').modal('show')
});
Everything is OK, but I want disable modal animation just for first time. How can I do this?
There is nothing in documentation about disabling animation just for first time
In my current project i have a link that opens modal with login form inside. When user enters wrong credentials then I reload page and show again login modal with errors. Currently I am using following code to show modal on page load:
$(function() {
$('#login-modal').modal('show')
});
Everything is OK, but I want disable modal animation just for first time. How can I do this?
There is nothing in documentation about disabling animation just for first time
Share Improve this question edited May 23, 2016 at 5:51 raver asked May 22, 2016 at 22:16 raverraver 2836 silver badges15 bronze badges 4- Please read docs before asking questions – charlietfl Commented May 22, 2016 at 22:20
- There is nothing in documentation about disabling animation just for first time – raver Commented May 22, 2016 at 22:33
- Nothing in question about only disabling only first time either – charlietfl Commented May 22, 2016 at 22:35
- So toggle the fade class as needed – charlietfl Commented May 23, 2016 at 12:48
2 Answers
Reset to default 8From the docs:
For modals that simply appear rather than fade in to view, remove the
.fade
class from your modal markup.
you should hard code the milliseconds inside modal function for quick response.