/ Published in: Rails
                    
                                        
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.
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
-#all purpose display loading icon for ajax calls
:javascript
Ajax.Responders.register( {
onCreate: function() { $('loadicon').show(); },
onComplete: function() { $('loadicon').hide(); }
});
Comments
 Subscribe to comments
                    Subscribe to comments
                
                