modal window 没有隐藏在 jquery 中的 ajaxStop 函数中

modal window does not hide in ajaxStop function in jquery

ajaxStart function 正在工作 correctly.But 模态 window 不隐藏在 ajaxStop functionjquery

这是我的代码

$(document).ajaxStop(function () {
   $('#loading-modal').modal('hide');
});

console中有一个errorUncaught TypeError: $(...).modal is not a function

确保您的 jquery 文件或 bootstrap.js 文件 overwriting again。 有时这是问题。 干杯。