关于在同一个DIV下的Hover效果问题

例子:

(function bindColumnRowHoverEvent(){
$('.ticket_list_body .work_product').live('mouseenter', function(e){
e.stopPropagation();
$(this).hover(function() {
if ($(this).find('.row_hover').length == 0){
$(this).addClass('row_hover');
}
},
function() {
$(this).removeClass('row_hover');
});
});
$('.ticket_list_body .task').live('mouseenter', function(e){
e.stopPropagation();
$(this).hover(function() {
$(this).closest('.work_product').removeClass('row_hover');
$(this).addClass('row_hover');
},
function() {
$(this).removeClass('row_hover');
if($(this).closest('.work_product').data('events').mouseenter){
$(this).closest('.work_product').addClass('row_hover');
}
});
});
}());

posted @ 2013-12-10 16:19  森林木马  阅读(628)  评论(0编辑  收藏  举报