简体   繁体   中英

jquery - Trigger first row of Datatable without row ID

I am trying to trigger first row of datatable without row ID. I can easily do this with row ID but the problem arises when the table is ordered with a different column than the default. The row ID may disappear due to pagination of the datatable.

Suppose I have 40 rows in a table and there are 8 pages of 5 rows each. The first row ID is on the top by default and it is easy to trigger it with row ID. But if the table is ordered according to some other column than default, then the first row ID may not be present on the first page.

Thanks in advance.

您可以像这样单击表$("#tableID>tbody>tr:first").trigger('click');的第一行$("#tableID>tbody>tr:first").trigger('click');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM