{"id":5586,"date":"2013-09-16T14:50:46","date_gmt":"2013-09-16T06:50:46","guid":{"rendered":"http:\/\/onthe8spot.com\/?p=5586"},"modified":"2013-09-16T14:50:46","modified_gmt":"2013-09-16T06:50:46","slug":"geek-stuff-ajaxsend-ajaxcomplete-ajaxstart-ajaxstop","status":"publish","type":"post","link":"http:\/\/onthe8spot.com\/index.php\/2013\/09\/16\/geek-stuff-ajaxsend-ajaxcomplete-ajaxstart-ajaxstop\/","title":{"rendered":"Geek Stuff: ajaxSend ajaxComplete ajaxStart ajaxStop"},"content":{"rendered":"<p>People who know me professionally that I have a natural aversion to the UI. I used to think that it was a natural aversion to javascript but later on I zeroed in to javascript UI stuff. This is me saying that whenever I can program the backend stuff and have other people do the frontend stuff I usually pull rank and have the junior devs do it.<br \/>\n&nbsp;<br \/>\nUnfortunately or maybe fortunately sometimes they have trouble with research and have to man up and do some UI trouble shooting.<br \/>\nThe main problem is that because the UI stuff are done by the junior devs the quality of code has a large variability in quality, meaning some code are crap.<br \/>\nI had to find a way to reliably determine if ajax request are done and prevent user action whenever it is still loading.<br \/>\nAfter a bit of reading through the jquery documentation I found these 4 functions, 2 pairs actually that can do the job if all are the requests are done through I believe the jQuery.<br \/>\najaxSend ajaxComplete ajaxStart ajaxStop<br \/>\n&nbsp;<br \/>\n<a href=\"http:\/\/api.jquery.com\/ajaxStart\/\">http:\/\/api.jquery.com\/ajaxStart\/<\/a><br \/>\n<a href=\"http:\/\/api.jquery.com\/ajaxStop\/\">http:\/\/api.jquery.com\/ajaxStop\/<\/a><br \/>\n<a href=\"http:\/\/api.jquery.com\/ajaxSend\/\">http:\/\/api.jquery.com\/ajaxSend\/<\/a><br \/>\n<a href=\"http:\/\/api.jquery.com\/ajaxComplete\/\">http:\/\/api.jquery.com\/ajaxComplete\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>People who know me professionally that I have a natural aversion to the UI. I used to think that it was a natural aversion to javascript but later on I zeroed in to javascript UI stuff. This is me saying that whenever I can program the backend stuff and have other people do the frontend &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/onthe8spot.com\/index.php\/2013\/09\/16\/geek-stuff-ajaxsend-ajaxcomplete-ajaxstart-ajaxstop\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Geek Stuff: ajaxSend ajaxComplete ajaxStart ajaxStop&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[72],"tags":[],"class_list":["post-5586","post","type-post","status-publish","format-standard","hentry","category-programming"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/onthe8spot.com\/index.php\/wp-json\/wp\/v2\/posts\/5586","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/onthe8spot.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/onthe8spot.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/onthe8spot.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/onthe8spot.com\/index.php\/wp-json\/wp\/v2\/comments?post=5586"}],"version-history":[{"count":0,"href":"http:\/\/onthe8spot.com\/index.php\/wp-json\/wp\/v2\/posts\/5586\/revisions"}],"wp:attachment":[{"href":"http:\/\/onthe8spot.com\/index.php\/wp-json\/wp\/v2\/media?parent=5586"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/onthe8spot.com\/index.php\/wp-json\/wp\/v2\/categories?post=5586"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/onthe8spot.com\/index.php\/wp-json\/wp\/v2\/tags?post=5586"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}