If an error happens will ajax stop still run?
I am wondering if you do an AJAX request and you have a method that should run when the AJAX request stops. Will the jQuery ajax stop run if the request runs into an error (such as a 500 error) 开发者_运维百科or if say the request times out?
Yes, the ajaxStop()
event will execute when this happens :)
It happens in the global complete
handler, which executes error or not.
You can test it out a bit here.
精彩评论