Return to Snippet

Revision: 29365
at July 28, 2010 03:23 by insanedreamer


Initial Code
-#all purpose display loading icon for ajax calls
:javascript
  Ajax.Responders.register( {
    onCreate: function() { $('loadicon').show(); },
    onComplete: function() { $('loadicon').hide(); }
    });

Initial URL

                                

Initial Description
Put this in application layout for global use. Have a hidden div called 'loadicon' with a loading icon (or whatever) in it, which is shown/hidden on ajax calls.

Initial Title
Display 'loading' icon for all ajax requests

Initial Tags
javascript

Initial Language
Rails