1.0.0 • Published 7 years ago

hd-preloaderjs v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

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:

OptionDefault valueDescription
backgroundnoneBackground color
foregroundnoneText 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.