jquery 点击出现遮罩并且有弹出层,点击元素本身不消失,点击其他地方消失
<div id="scs" style="width:200px;height:200px;border: 1px solid red;display: none"></div>
<input type="button" value="显示" id="scscms" />
<script type="text/javascript">
$(function(){
$("#scscms,#scs").click(function(e){
$("#scs").show();
e.stopPropagation();//阻止冒泡
});
$(document).click(function(e){
$("#scs").hide();
e.stopPropagation();
})
})
</script>