Insus.NET就在前一示例中,修心jQuery来练习。 修改.mouseover和.mouseout的事件代码:
$('tbody td').mouseover(function () { $('td:nth-child(' + ($(this).index() + 1) + ')').addClass('overStyle'); }).mouseout(function () { $('td:nth-child(' + ($(this).index() + 1) + ')').removeClass('overStyle'); })
View Code
看看演示: