Alternate row coloring in jquery

后端 未结 3 728
攒了一身酷
攒了一身酷 2021-01-18 06:43

I have a table with expand and collapse of rows, with column sortable. Below is my code, is there is any ways to improve its performance. And read appending complete group

3条回答
  •  没有蜡笔的小新
    2021-01-18 07:22

    you are inside each loop, do this :

    $.each(myData, function(index, row) {
    
           if(index % 2 == 0)
           {
                row.addClass("AltRow");
           }
    )};
    

提交回复
热议问题