Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这可能非常简单。我有一个表格,希望每 4 行在侧面有一个指示器来表示表格中的分隔符。
http://jsbin.com/AGijUNe/2/edit
我希望它在每个第 4 行的页面指示器单元格中根据顺序显示 1、2、3 等。
像这样的东西:
$(function (){ $('tr:nth-child(4n)').addClass('row4'); $('tr:nth-child(4n) .page-indicator').each(function(i){ $(this).text(i+1); }); });
演示