Created
July 24, 2008 01:02
-
-
Save oliyoung/1978 to your computer and use it in GitHub Desktop.
show an animated gif whenever an AJAX called is made
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ajax.Responders.register({ | |
onCreate: function() { | |
if($('busy') && Ajax.activeRequestCount>0) | |
Effect.Appear('busy',{duration:0.5,queue:'end'}); | |
}, | |
onComplete: function() { | |
if($('busy') && Ajax.activeRequestCount==0) | |
Effect.Fade('busy',{duration:0.5,queue:'end'}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment