Skip to content
Show loading modal
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets
README.md
index.html

README.md

jquery-loading-block

Nowadays we do a lots of ajax thing on website, therefore we can see loading animation everywhere, this plugin is an easy one to show and hide loading overlay.

Basic usage

<script type="text/javascript" charset="utf-8">
$(function() {
    // imgPath almost necessary
    $.loadingBlockShow({
        imgPath: 'assets/img/icon.gif'
    });

    setTimeout($.loadingBlockHide, 5000);
});
</script>

options

var defaults = {
    imgPath: 'img/icon.gif',
    imgStyle: {
        width: 'auto',
        textAlign: 'center',
        marginTop: '20%'
    },
    text: 'loading...',
    style: {
        position: 'fixed',
        width: '100%',
        height: '100%',
        background: 'rgba(255, 255, 255, .8)',
        left: 0,
        top: 0,
        zIndex: 10000
    }
};
You can’t perform that action at this time.