.
HTML:
<body>
<div id="overlay">
this is above the body!
</div>
</body>
CSS
#overlay {
background-color: #ccc;
display: none;
height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 100;
}
#ajax-div {
z-index: 200;
}
JavaScript:
<script type="text/javascript">
$(document).ready(function() {
$.ajax({
success: function() {
$('#overlay').show();
}
})
$('#ajax-div a#close').live('click', function() {
$(this).parent().hide();
$('#overlay').hide();
});
});
</script>