2016-09-20 63 views
1

ajaxStart function工作正常。但模态窗口不隐藏在ajaxStop functionjquery中。模态窗口不会隐藏在jquery中的ajaxStop函数

这是我的代码

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

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

+0

可否请您在隐藏代码之前加上'alert(1)',并确认是否执行了'ajaxStop'。也请分享HTML。 – vijayP

+0

是它执行。 –

+1

检查你的js文件是否被盗用。 –

回答

1

确保您的jquery文件或bootstrap.js文件overwriting again。有时候这是问题。 欢呼声。