<style>
#mcs2_container{ width:100%; height:500px; background:#000; filter: progid:DXImageTransform.Microsoft.Alpha(opacity=60);
opacity:0.6; position:absolute; z-index:9999;}
#mcs2_container .customScrollBox{position:relative; width:500px; height:500px; background:#FFF; overflow:hidden; margin:auto;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100);
opacity: 1; background:#FFF; }
</style>
<div id="mcs2_container" style=" visibility:hidden;">
<div class="customScrollBox">
</div>
</div>//JS代码
$(document).ready(function(){
点击中间不消失
$('.customScrollBox').click(function() {
$(this).parent().unbind('click');
});
点击旁边区域小时
$('#mcs2_container').click(function() {
$(this).css('visibility','hidden');
});
});
为什么我点击了中间 已经unbind 然后再点 旁边 不能重新绑定了。。想不通
#mcs2_container{ width:100%; height:500px; background:#000; filter: progid:DXImageTransform.Microsoft.Alpha(opacity=60);
opacity:0.6; position:absolute; z-index:9999;}
#mcs2_container .customScrollBox{position:relative; width:500px; height:500px; background:#FFF; overflow:hidden; margin:auto;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100);
opacity: 1; background:#FFF; }
</style>
<div id="mcs2_container" style=" visibility:hidden;">
<div class="customScrollBox">
</div>
</div>//JS代码
$(document).ready(function(){
点击中间不消失
$('.customScrollBox').click(function() {
$(this).parent().unbind('click');
});
点击旁边区域小时
$('#mcs2_container').click(function() {
$(this).css('visibility','hidden');
});
});
为什么我点击了中间 已经unbind 然后再点 旁边 不能重新绑定了。。想不通
解决方案 »
- javascript onload问题
- 关于单引号的问题
- javascript如何处理FIREFOX的中文参数编码问题
- 大家看看这个帖子,真逗~~~
- 怎么判断显示在List中的数据,大于30个字符显示两行,大于60个字符的话后面的全都不要了
- 555 F C KEditor 又见F C KEditor 啊5555以后打死也不用这种东西了啊55好难控制啊
- jquery 替换指定内容
- 已知文件路径,要从路径中解析文件名,求正则表达式
- 在提交页面时, 如何判断form表单里,几个名字相同的textArea,是否同时为空??????100分
- 在用户关闭浏览器时(点击X),我该怎么铺获这个操作,然后进行相关的数据库操作?
- JS实现浏览器F11全屏
- 关于text-indent的疑惑
e.stopPropagation();
});$('#mcs2_container').click(function() {
$(this).css('visibility','hidden');
});
});
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script src="jquery.js" type="text/javascript"></script>
<style>
#mcs2_container{ width:100%; height:500px; background:#000; filter: progid:DXImageTransform.Microsoft.Alpha(opacity=60);
opacity:0.6; position:absolute; z-index:9999;}
#mcs2_container .customScrollBox{position:relative; width:500px; height:500px; background:#FFF; overflow:hidden; margin:auto;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100);
opacity: 1; background:#FFF; }
</style>
<script type="text/javascript">
//JS代码
$(document).ready(function(){
$('#mcs2_container').click(function() {
$(this).css('display','none');
});
});
//点击中间不消失
$('.customScrollBox').click(function() {
$(this).parent().unbind('click');
});
//点击旁边区域小时</script>
</head>
<body><div id="mcs2_container" style=" display:inline">
<div class="customScrollBox">
</div>
</div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script src="jquery.js" type="text/javascript"></script>
<style>
#mcs2_container{ width:100%; height:500px; background:#000; filter: progid:DXImageTransform.Microsoft.Alpha(opacity=60);
opacity:0.6; position:absolute; z-index:1;}
#mcs2_container .customScrollBox{position:relative; width:500px; height:500px; background:#FFF; overflow:hidden; margin:auto;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100);
opacity: 1; background:#FFF; z-index:2;}
</style>
<script type="text/javascript">
//JS代码
$(document).ready(function(){
$('.customScrollBox').click(function(e) {
e.stopPropagation();
});
$('#mcs2_container').click(function() {
$(this).css('display','none');
});
});
//点击中间不消失//点击旁边区域小时</script>
</head>
<body><div id="mcs2_container" style=" display:inline">
<div class="customScrollBox">
</div>
</div>
</body>
</html>