jQuery datatables add class to tr

后端 未结 5 1840
孤独总比滥情好
孤独总比滥情好 2021-02-01 01:55

I am using jQuery and datatables. I want to add a class to the TR element of a particular row. I know how to find the row. The console.dir(row); shows the r

5条回答
  •  忘了有多久
    2021-02-01 02:38

    $('tr', row) is looking for a tr element in the context of row, meaning it will search for a tr element inside the row provided as context parameter.

    According to API, this should work

    $(row).addClass("label-warning");
    

提交回复
热议问题