I have a table which has many rows and 3 columns. Each column has div inside. I want to get the height of the div in the 2nd column.
I gave jQuery as under:
$('#elementId tbody tr td.elment-class-2 div').height(); // works good, returns height of first rows div
Now, I want to run this in a loop so get the height of div present in all rows in 2nd column. So I wrote planned this code:
var count = $('#elementId tbody tr td.elment-class-2 div').length;
$('#elementId tbody tr td.elment-class-2 div')[0]; //
$('#elementId tbody tr td.elment-class-2 div')[1]; // and so on in a loop
But this returns error
$('#elementId tbody tr td.elment-class-2 div')[0]; // Uncaught TypeError: $(...)[0].height is not a function
P.S: Newbie to jQuery here. Pardon my foolish mistakes.