Edit
OK, I didn’t see that you are using the jQuery grid plugin .
All columns have the role="gridcell" attribute, so you can use the attribute-based selector to select all cells:
// untested $('td[role*="gridcell"]').hover();
First answer
This answer is more like a universal answer to the problem.
I assume you have a table like this:
<table> <tr class="jqgrow"> <td>1</td> <td>2</td> <td>3</td> </tr> </table>
Than you can get information about the columns inside the hanging line with:
$('.jqgrow').mouseover(function(e) { // get all child elements (td, th) in an array var cols = $(this).children(); console.log('All cols: ' + cols); // to retrieve a single column as a jQuery object use '.eq()' - it like every array redo-indexed console.log('HTML from col 2: ' + cols.eq(1).html()); });
This will work for any other structure:
<div class="jqrow"> <div>1</div> <div>2</div> <div>3</div> </div>
If you want to hover over each .jqrow , you can attach it directly to the children:
$('.jqgrow').children().mouseover(function(e) {
source share