Я хочу добавить (data-row-num="1",data-row-num="2",data-row-num="3") в строку моей таблицы HTML.
Может кто-нибудь пожалуйста, помогите мне это сделать?
Name
Position
Office
Tiger Nixon
System Architect
Edinburgh
Cedric Kelly
Senior Javascript Developer
Edinburgh
$(document).ready(function() {
$('#example').dataTable( { } );
});
$("tr").each(function() {
$("tr").attr("data-row-num",????);
});
Подробнее здесь: https://stackoverflow.com/questions/784 ... -by-jquery
Мобильная версия