npm package for add loader to DOM.
npm install --save hn-loader
-
Link to style.css
<link href="style.css" rel="stylesheet"/>
-
Link to hn-loader.js
<script src="hn-loader.js"></script>
-
use hnLoader to display a loader
// Display an Loader hnLoader.show('Loading..!',"stille page is loading.,",{loaderType : "default"})
// Display a Loader, with ripple
hnLoader.show('Loading..!',"stille page is loading.,",{loaderType : "ripple"})
// Display a Loader, with roller
hnLoader.show('Loading..!',"stille page is loading.,",{loaderType : "roller"})
// Display a Loader, with ellipsis
hnLoader.show('Loading..!',"stille page is loading.,",{loaderType : "ellipsis"})
// Remove a Loader
hnLoader.hide()
// chnage Loader at run Time
hnLoader.changeLoader("ripple"})
// Modify loader text or message
hnLoader.modify('Loading..!',"stille page is loading, We need some more time,,",{loaderType : "ellipsis"})