Append Site Overlay DIV

Submitted by:Jimmy Kerson

Date added:28 January, 2011

Category:jQuery

Append Site Overlay DIV

Tags: append site , jquery snnippet , overlay div

Code Snippet:

$(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
});

});
 
 

Comments