#uiBlock
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
- jQuery library version 1.7.0 and higher
- Install via Bower - TBD
- Download via GitHub
#####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");
};
E-mail: [email protected]
MIT