How to get a cell's column header and row's first td when I click a cell in grid?
I can get the td's text using :
trigger.find('td:first').attr('id')
You can use such methods jsFiddle .
For getting the position of a cell in the line, you can use jQuery.fn.index
and for the first cell, you get the row with $(this).closest("tr")
and then select the first cell with .find("td:first")
.
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.