Description:
In our JavaScript plugins collection, we are going to add one more plugin which is very light weight, easy to use JavaScript content loader plugin.
This plugin can be very useful, if you are creating a web page where you need to load contents from AJAX call. You can also set the loader text which will be display at the center of the loader.
How can I use it?
First, Download the plugin from ‘Download’ button above and include the slick-loader.min.css and slick-loader.min.js files in your web page.
<link rel=”stylesheet” type=”text/css” href=”css/slick-loader.min.css”>
<script src=”js/slick-loader.min.js”></script>
You can also use CDN:
<link rel=”stylesheet” type=”text/css” href=”https://unpkg.com/[email protected]/slick-loader.min.css”>
<script src=”https://unpkg.com/s[email protected]/slick-loader.min.js”></script>
Show the loader on AJAX request.
SlickLoader.enable();
Hide the loader when AJAX request processing is done.
SlickLoader.disable();
Set the texts at the center of the loader.
SlickLoader.setText(‘Lipku.com’, ‘Best JavaScript Plugins’);
Remove the texts from center of the loader.
SlickLoader.clearText();
Remove the SlickLoader instance.
SlickLoader.destroy(selector);
The post An easy to use JavaScript content loader plugin – Slick Loader appeared first on Lipku.com.