在模态弹出窗口中加载页面并且在模态完全加载之前我想显示加载消息,即使模态未完全加载也会隐藏
这就是我试过的
$('#modaltrucks').modal('show')
.find('#modalContent')
.before(function() {
$.noty.closeAll();
var n = noty({
text: 'Loading ...',
animation: {
open: {height: 'toggle'},
close: {height: 'toggle'},
easing: 'swing',
speed: 500 // opening & closing animation speed
}
});
})
//am trying to show the above noty before load
.load("view-report-trucks", params)
//after loading close the notif
.after(function() {
$.noty.closeAll();
});
出了什么问题