Ladda is a javascript library to create buttons with built-in loading indicators , effectively bridging the gap between action and feedback.
Primarily intended for use with forms where it gives users immediate feedback upon submit rather than leaving them wondering while the browser does its thing.
Ladda can be use with both jQuery and javascript.