jquery 如何给新生成的元素绑定 hover事件?

$("table tr").live({
   mouseenter:
   function()
   {
      //todo
   },
   mouseleave:
   function()
   {
      //todo
   }
});
 
$('ul li').live('mouseenter',function(){
$('#tips').show();
}).live('mouseleave',function(){
$('#tips').hide();
});
posted on 2015-01-04 14:00  蚂蚁max  阅读(1894)  评论(0编辑  收藏  举报