jQuery dataTables add id to added row

前端 未结 6 1931
粉色の甜心
粉色の甜心 2020-12-18 23:08

Is it possible to add ID to last added row with jQuery DataTables (e.g., ...) ?

$(\'#example\').dataTable().fnA         


        
6条回答
  •  既然无缘
    2020-12-18 23:41

    Here is a more cleaner approach that I found here:

    table.row.add( [ ... ] ).node().id = 'myId';
    table.draw( false );
    

提交回复
热议问题