jquery die()请教 怎么理解下面的代码? $(".classa",$box).die().live("click",function(){ //.... }).css({zIndex:"99"}); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 $(".classa",$box).die().live("click",function(){//....}).css({zIndex:"99"});这个意思是 查找所有包含样式是classa的元素,1.die() 删除它绑定的事件2.live("click",function(){}) 添加上click事件3.把它们的CSS zIndex设置为99$box这个不知道 Remove all event handles added with the live() method 嗯,谢谢看还有没有人能解释下$box这个$box = $('#Wtuparent');但是$(".classa",$box)JQUERY选择器不能这样子用吧? <!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" /><script type="text/javascript" src="jquery-1.4.4.min.js"></script><script type="text/javascript"><!--$(window).load(function(){ $a = $('#Wtuparent'); $('.classa',$a).die().live("click",function(){ alert('111'); $(this).css({zIndex:"1"}); }).css({zIndex:"99"});});//--></script><title>无标题文档</title></head><body> <div id="Wtuparent" style=" clear:both; height:40px; text-align:center"> <a href="#">aa</a><br/> <span class="classa" style=" display:block; padding:3px; cursor:pointer;">bb</span> </div> <div style=" clear:both; height:40px; text-align:center"> wwwwwwwwwwwwww </div></body></html> onmouseover方法修改状态栏信息失败 求一个比较好JS右下角弹出广告 js播放从数据库中取出的视频 根域无法写入cookie 在VS2008中如何实现多个div控件的对齐? 关于多个RADIO组的取值问题 求大神赐教:如何交换数组里两个对象的位置 关于onclick事件如何在最后验证成功后跳到下一个页面。 如何用javascript做一个投票程序 关于ShowModelDailog的问题!(解决了马上给分) 鼠标拖拽div,经过其他div时,怎么让后面的div变色,移出时再回复原色? js输出一个iframe然后直接跳转的非想要现象
//....
}).css({zIndex:"99"});
这个意思是 查找所有包含样式是classa的元素,
1.die() 删除它绑定的事件
2.live("click",function(){}) 添加上click事件
3.把它们的CSS zIndex设置为99$box这个不知道
看还有没有人能解释下$box这个
$box = $('#Wtuparent');
但是
$(".classa",$box)
JQUERY选择器不能这样子用吧?
<!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" />
<script type="text/javascript" src="jquery-1.4.4.min.js"></script>
<script type="text/javascript">
<!--
$(window).load(function(){
$a = $('#Wtuparent');
$('.classa',$a).die().live("click",function(){
alert('111');
$(this).css({zIndex:"1"});
}).css({zIndex:"99"});
});
//-->
</script>
<title>无标题文档</title>
</head><body>
<div id="Wtuparent" style=" clear:both; height:40px; text-align:center">
<a href="#">aa</a><br/>
<span class="classa" style=" display:block; padding:3px; cursor:pointer;">bb</span>
</div>
<div style=" clear:both; height:40px; text-align:center">
wwwwwwwwwwwwww
</div>
</body>
</html>