Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

monkeymonk/jquery.loader.js

Repository files navigation

jQuery.loader Plugin - v 1.0

Display a loader on your page or HTML block element.

Project site: http://monkeymonk.github.com/jquery.loader.js/

Demo: http://monkeymonk.be/jquery.loader.js/demo/

Usage

Basic

First of all, include jquery.loader.js (1.526 kb), jquery.loader.min.css (1.135 kb) and loader.gif (3.866 kb) in your HTML then start to use jQuery.loader.

$(document).ready(function() {
 $('body').loader('show');
 setTimeout(function () {
 $('body').loader('hide');
 }, 2000);
});

Options

{
 className: 'loader',
 tpl: '<div class="{className} hide"><div class="{className}-load"></div><div class="{className}-overlay"></div></div>',
 delay: 200,
 loader: true, // if true, you can hide the loader by clicking on it
 overlay: true, // display or not the overlay
 // Callback
 onHide: function () {},
 onShow: function () {}
}

Methods

jQuery().loader('show', options);

jQuery.loader use a tiny template system that let you an easy way to customize your loader.

$('body').load('show', {
 onHide: function () {
 // do something...
 }
});

jQuery().loader('hide', onHide);

Hide the loader

$('body').loader('hide');

Browsers: Tested and Working In

  • IE 6, 7, 8, 9, 10
  • Firefox 3+
  • Opera 10+
  • Safari 4+

About

Display a loader on your page or HTML block element.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /