Skip to content

Instantly share code, notes, and snippets.

@fritids
Created February 5, 2014 02:35
Show Gist options
  • Select an option

  • Save fritids/8816546 to your computer and use it in GitHub Desktop.

Select an option

Save fritids/8816546 to your computer and use it in GitHub Desktop.
$(function() {
// create a <div> to hold the overlay styles ...
$("body").append("<div id='overlay'></div>");
// get the height of the document ...
var docHeight = $(document).height();
// add some styling to the overlay.
$("#overlay")
.height(docHeight)
.css({
'top': 0,
'left': 0,
'width': '100%',
'position': 'fixed',
'background-color': 'black',
'opacity' : 0.1,
'z-index': 5000
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment