This feature will create an overlay on the entire browser screen using the defined properties.
$('a.cell').click(function() {
$('<div id = "overlay" />').appendTo('body').fadeIn("slow");
});
#overlay
{
background-color: black;
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
display: none;
z-index: 100;
opacity: 0.5;
}
Then, there is a function to remove this overlay.
$('#overlay').click(function() {
$(this).fadeOut("slow").remove();
});
However, the removal function does not seem to be working correctly and now the page is stuck with a black overlay. What could be causing the issue?