HTML
We only need to add the following code on the first line of the [body].
<div id="fakeLoader"></div>
CSS
Then load the css style file inside [head].
<link rel="stylesheet" href="css/fakeLoader.css">
JS
Do not forget to load the jQuery library files and fakeLoader.js.
<script src="js/jquery.js"></script>
<script src="js/fakeLoader.min.js"></script>
Then add the following code inside the [body]:
<script type="text/javascript">
$("#fakeloader").fakeLoader();
</script>
The above code is called fakeLoader.js plug-in, and it also provides the following options to set.
timeToHide: loading animation transition time, in milliseconds, default 1200.
spinner: animation, there are seven values Optional: 'spinner1', 'spinner2', 'spinner3', 'spinner4', 'spinner5', 'spinner6', 'spinner7', default value: spinner1.
bgColor: Transition mask layer background color, default: "# 2ecc71".
imagePath: custom transition animation picture.