我给section里的标签都邦定了click事件,
我想点其中的input时取消其它标签的绑定事件,
再点击div点才重新恢复其它的事件绑定功能,
这个要怎么改,我下面不行,取消绑定事件就绑不回来了!!!
<style>
section{overflow:hidden;}
input,font,span{width:100px;height: 30px;display:block;background:red;margin:0 10px;float:left;text-align: center;line-height: 30px;font-weight:bold;}
div{width:360px;height:300px;background:#000;overflow:hidden;display: none;}
</style>
<section>
<input type="button" value="input"/>
<font>font</font>
<span>span</span>
</section>
<div>div</div>
<script>
$(function(){
$("input").bind("click",function(){
$("font").unbind("click");
$("span").unbind("click");
$("div").show(function(){
$(this).click(function(){
$("font").bind("click");
$("span").bind("click");
$(this).hide();
})
});
});
$("font").bind("click",function(){
alert("font");
});
$("span").bind("click",function(){
alert("span");
});
})
</script>