Skip to content

Instantly share code, notes, and snippets.

@amirkhan81
Created October 30, 2012 17:54
Show Gist options
  • Save amirkhan81/3981855 to your computer and use it in GitHub Desktop.
Save amirkhan81/3981855 to your computer and use it in GitHub Desktop.
Append Site Overlay Div
$(function() {
var docHeight = $(document).height();
$("body").append("<div id='overlay'></div>");
$("#overlay")
.height(docHeight)
.css({
'opacity' : 0.4,
'position': 'absolute',
'top': 0,
'left': 0,
'background-color': 'black',
'width': '100%',
'z-index': 5000
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment