Skip to content
/ uiBlock Public

A lightweight jQuery plugin to block the targeted element in DOM. Mostly used for ajax loading snippets of page.

License

Notifications You must be signed in to change notification settings

IvoMIS/uiBlock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#uiBlock

About

A lightweight jQuery plugin to block the targeted element in DOM. Mostly used for ajax loading snippets of page.

  • It's tiny! Just 2KB
  • Easy to customize
  • Allows callback functions

Prerequisites

  • jQuery library version 1.7.0 and higher

Installation

  • Install via Bower - TBD
  • Download via GitHub

Usage

#####Block element

$("#myDiv").uiBlock();

or

$("#myDiv").uiBlock("start");

#####Unblock element

$("#myDiv").uiBlock("stop");

#####Configure U can change default settings for plugin

$.fn.uiBlock.defaults.text = "Processing";

or u can pass it with initializaiton

$("#myDiv").uiBlock("start", {
text: "Processing"
});

#####Callbacks u can define callback onStart

$.fn.uiBlock.defaults.onStart = function(element) {
console.log(element.id + " was blocked");
};

and callback onStop

$.fn.uiBlock.defaults.onStop = function(element) {
console.log(element.id + " was unblocked");
};

Contact on author

E-mail: [email protected]

License

MIT

About

A lightweight jQuery plugin to block the targeted element in DOM. Mostly used for ajax loading snippets of page.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published