cucuru cucuru - 5 months ago 36
HTML Question

access to a table tr with index

I want to get a row content in my table:

<div class="myTable">
<table id="dataTable">

To get the td I use:


wich works and get the tr data, but, when do it with variable:

var j= 1;

it fails.

What is the problem?

var j= 1;
 $('#dataTable').find('tbody').find('tr:nth-child(' + j +')');