在我当前的项目中,我有一个链接,可以打开模态,其中包含登录表单。当用户输入错误的凭据时,我重新加载页面并再次显示带有错误的登录模式。目前我正在使用以下代码在页面加载时显示模式:
$(function() {
$('#login-modal').modal('show')
});
一切都很好,但我想第一次禁用模态动画。我怎样才能做到这一点?
文档中没有任何关于第一次禁用动画的内容
最佳答案
来自docs :
For modals that simply appear rather than fade in to view, remove the
.fade
class from your modal markup.
关于javascript - Bootstrap : How to show modal without animation just for first time?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37380221/