String $(this).css("z-index","99999"); should be adjusted, so the actual element that should remain on top of the disconnect is present: $("#GraphBox").css("z-index", "99999"); .
In this case, the element at the top is <div id="GraphBox">...</div> .
In addition, all boxes for an anonymous function must be removed for clarity and correctness:
// Show MicroClean Details window $("#MicroCleanClick").click(function () { $("#GraphBox").show(); $("#GraphBox").css("z-index", "99999"); $("#overlay").fadeIn(300); loadGraph(); return false; }); // Close MicroClean Details Window $("#overlay").click(function (e) { $("#overlay").fadeOut(300, function () { $("#GraphBox").hide(); }); });
Remember to add display:none; in #GraphBox in the CSS file. Otherwise, fadeIn and fadeOut require a trigger.
To close the element at the top of the blackout at the same time as turning it off, add $("#GraphBox").hide(); in:
$("#overlay").click(function (e) { $("#overlay").fadeOut(300, function () { $("#GraphBox").hide(); }); });
The code is tested in IE and Chrome.
Vbman source share