当点击发生在它之外时,我怎样才能让它<div>
隐藏起来?我希望能够隐藏它,然后显示它后面页面的其余内容。
<html>
<style>
.overlay
{
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: #fff;
opacity: 0.5;
filter: alpha(opacity=50);
z-index: 80;
}
.popupContent
{
background: #fff;
padding: 5px;
border: 1px solid black;
position: fixed;
top: 100px;
left: 400px;
bottom: 365px;
right: 300px;
z-index: 81;
}
</style>
<div id="initialPopup">
<div class="overlay"></div>
<div class="popupContent" onclick="hideInitialPopup()">
Good Morning, Please Upload Your File Today!
</div>
</div>
<script>
function hideInitialPopup() {
document.getElementById("initialPopup").style.display = "block";
$("popupContent").mouseup(function(){
if(! mouse_is_inside) $
}
</script>
</html>