【发布时间】:2012-03-29 19:16:56
【问题描述】:
$('table tbody tr').click(function () {
// how to remove clickedRow class from all same level rows?
$(this).addClass('clickedRow');
});
When a row is selected, I'd like to remove the clickedRow css class from all other rows of the same table and only add it to the currently selected row.
我的页面中有多个表格,因此每次点击都应仅在同一个表格的上下文中执行上述操作。
这怎么可能?
谢谢,
【问题讨论】:
标签: jquery asp.net html css class