What is a good way to block until a previous ajax event is completed?
I followed https://stackoverflow.com/questions/719194/how-can-you-make-a-vote-up-down-button-like-in-stackoverflow but if I click the button fast enough, it'll send multiple (and maybe inconsistent) events to the server. How do I make it so it'll forcethe user to wait before another click can be registered?
Edit: I also do not want it to block globally - just for that button/item. Do I'll need to maintain a hash?
以上就是Preventing an duplicate ajax events in jquery的详细内容，更多请关注web前端其它相关文章！