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

mac2022-06-30  72

例子:

(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'); } }); }); }());

转载于:https://www.cnblogs.com/owenma/p/3467661.html

相关资源:使IE6支持:hover效果使用li:hover或div:hover
最新回复(0)