mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-12 23:27:48 +00:00
Merge pull request #8523 from seballot/progress-for-ajax-request
Improve loading spinner display
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
$(document).ready ->
|
||||
progressTimer = null
|
||||
$(document).ajaxStart ->
|
||||
$("#progress").fadeIn()
|
||||
progressTimer = setTimeout ->
|
||||
$("#progress").fadeIn()
|
||||
, 500
|
||||
|
||||
$(document).ajaxStop ->
|
||||
$("#progress").fadeOut()
|
||||
clearTimeout(progressTimer) if progressTimer?
|
||||
$("#progress").stop().hide()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user