How can I create a really basic overlay in jQuery without UI?
What is a lightweight plugin?
Here is a simple javascript only solution
function displayOverlay(text) {
$("" + text + "
").css({
"position": "fixed",
"top": 0,
"left": 0,
"width": "100%",
"height": "100%",
"background-color": "rgba(0,0,0,.5)",
"z-index": 10000,
"vertical-align": "middle",
"text-align": "center",
"color": "#fff",
"font-size": "30px",
"font-weight": "bold",
"cursor": "wait"
}).appendTo("body");
}
function removeOverlay() {
$("#overlay").remove();
}
Demo:
http://jsfiddle.net/UziTech/9g0pko97/
Gist:
https://gist.github.com/UziTech/7edcaef02afa9734e8f2