Friday, September 19, 2014

Show "loading" icon for long running AJAX calls only.

If an AJAX call is slow, then I want to present a "loading" overlay to let the user know the process is still working. However, on short calls, it is distracting to the user to flash the "loading" overlay and then immediately remove it. This code allows me to specify a time (in milliseconds) for how long to wait before showing the spinning wheel.
http://codepen.io/clarmond/pen/mvalt

0 comments:

Post a Comment

 
Blogger Templates