Skip to main content

Bug Tracker

Side navigation

#14501 closed bug (duplicate)

Opened October 31, 2013 07:36AM UTC

Closed November 10, 2013 07:09PM UTC

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

Reported by: 981064100@qq.com 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

在以前的版本中就可以实现,新版的不行,希望尽快修复

Attachments (0)
Change History (1)

Changed November 10, 2013 07:09PM UTC by dmethvin comment:1

resolution: → duplicate
status: newclosed

Duplicate of #13245.