Bug Tracker

Opened 6 years ago

Closed 6 years ago

#14501 closed bug (duplicate)

在实现表格变色上迟钝,slow,and error in selector

Reported by: 981064100@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.2
Keywords: Cc:
Blocked by: Blocking:

Description

http://jsbin.com/asIWequ/4/edit

<tbody>

<tr><td><input type="radio" name="choice" value=""/></td>

<td>张山</td><td>男</td><td>浙江宁波</td></tr>

<tr><td><input type="radio" name="choice" value="" /></td>

<td>李四</td><td>女</td><td>浙江杭州</td></tr>

</tbody>

<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>

<script type="text/javascript"> $(function(){

$("tbody>tr:odd").addClass("odd"); 先排除第一行,然后给奇数行添加样式 $("tbody>tr:even").addClass("even"); 先排除第一行,然后给偶数行添加样式 $('tbody>tr').click(function() {

$(this)

.addClass('selected') .find(':radio').attr('checked',true)

.parents("tr").siblings().removeClass('selected')

});

})

</script> http://jsbin.com/asIWequ/4/edit 在以前的版本中就可以实现,新版的不行,希望尽快修复

Change History (1)

comment:1 Changed 6 years ago by dmethvin

Resolution: duplicate
Status: newclosed

Duplicate of #13245.

Note: See TracTickets for help on using tickets.