1.0.0 • Published 8 years ago
hd-preloaderjs v1.0.0
hd-preloader.js
An easy way to make preloader for your webapp
Documentation
Make a div with class .loader on your page and add inside all thing do you want on page loading
There are just 2 options for preloader:
| Option | Default value | Description | 
|---|---|---|
| background | none | Background color | 
| foreground | none | Text color during loading | 
Preloader have just one function:
show(show: boolean) that you can use for toggle preloader
Examples
<!DOCTYPE html>
<html lang="en">
    <head>
        <!-- Your head tag -->
    </head>
    <body>
        <div class="loader">
            <!-- Thing that you want to add -->
        </div>
        <!-- Your body content -->
        <script src="jquery.js"></script>
        <script>
        var preloader = new Preloader.Preloader({
            background: 'black',
            foreground: 'white'
        });
        preloader.show(true);
        $(document).ready(function() {
            preloader.show(false);
        });
        </script>
    </body>
</html>License
See LICENSE file bundled with this package.
1.0.0
8 years ago