`
fenglingxuewqk
  • 浏览: 81989 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

.live()对tab里的内容无效

阅读更多

今天在做项目时发现 用jquery的.live()绑定click事件 处于tab中的span无法绑定到click事件 而其他地方的span则都绑定到了 用.click()绑定的话就没这个问题。。。百思不得其解 望jquery高手能解答一下

分享到:
评论
1 楼 yalinmmsj 2012-08-15  
呵呵  今天做项目遇到了同样的问题
$("#"+selfId).live('mouseenter',{pId:selfId,selfId:selfId,imgId:imgId,index:index},function(event){my_mouseEnterEvent(event);});

$("#"+selfId).live('mouseleave',{imgId:imgId},function(event){my_mouseLeaveEvent(event);});

我绑定了两个事件mouseenter 和mouseleave
mouseleave起作用了  但mouseenter怎么都不触发  找个各种方法
后来下了个livequery的插件下来 解决了这个问题

相关推荐

Global site tag (gtag.js) - Google Analytics