adsense

Friday, March 2, 2018

find next table-row

When iterating though a table there are instances where we have to get the next/ previous rows.
In an earlier article I discussed how to iterate on table rows using jQuery. We can use the same code with few extra lines to get the row as shown below.

var next =$this.closest('tr').next('tr');
var prev =$this.closest('tr').prev('tr');

cheers,
Samitha

No comments:

Post a Comment