Did it ever happen that you have design a nice looking Visualforce page and had to insert a loading icon but didn't want to use the one provided by Salesforce (see image below)?
Well it happened to me a lot of time that I needed to find a reusable piece of code for a loading/spinner icon. Doing some research I found a that this guy, Tobias Ahlin, has come up with a SpinKit (https://github.com/tobiasahlin/SpinKit). So I decided to make a reusable component for having different kind of spinner with customize colors.
It is pretty easy to use, just need to copy the component on your Salesforce environment and execute some JavaScript whenever you want to toggle on and off the spinner/loading.
Source code can be found here: https://github.com/kevanmoothien/sfdc-spinner
The result should look something like that:
A live demo of all the spinners is available at: http://tobiasahlin.com/spinkit/
Hope you like this tutorial.
If you have any suggestions on how to improve this component, I will be glad to hear them.
Cheers!!
Hi Kevan, I'm having a grey page no image when I click command button to show km_spin(true);.
ReplyDeletePlease advice.