Skip to content

Instantly share code, notes, and snippets.

@darkcolonist
Last active July 18, 2016 08:17
Show Gist options
  • Save darkcolonist/fce7af44f49c9e02d557eb99e6e8ae62 to your computer and use it in GitHub Desktop.
Save darkcolonist/fce7af44f49c9e02d557eb99e6e8ae62 to your computer and use it in GitHub Desktop.
jquery document overlay - usually for disabling interaction with the entire screen because of a background process
$("<div>")
.attr("id", "waiter-overlay")
.css({
"position" : "fixed",
"top" : "0",
"left" : "0",
"width" : "100%",
"height" : "100%",
"background-color": "#000",
"filter" : "alpha(opacity=50)",
"-moz-opacity" : "0.5",
"-khtml-opacity" : "0.5",
"opacity" : "0.8",
"z-index" : "10000",
"display" : "table",
"text-align" : "center"
}).append(
$("<span>").css({
"display" : "table-cell",
"vertical-align" : "middle",
"font-size" : "8em"
})
.text("processing... please wait")
).appendTo(document.body);
@darkcolonist
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment