我通过 ajax 提交表单。我可以在 Chrome 的网络面板中看到它成功并返回了一些 JSON。但是,永远不会触发“ajax:success”事件。为什么?
// Does not work, despite getting success in the Network Panel.
$('#uploadDataForm').on("ajax:success", function(){
console.log('file uploaded!');
});
// Works.
$('#uploadDataForm').on("ajax:send", function(){
console.log('file sent!');
console.log('yep');
});