There is such a table:
<table class="mable"> <tr class="t"><td>4</td></tr> <tr class="t"><td>3</td></tr> <tr class="t"><td>2</td></tr> <tr class="t"><td>1</td></tr> </table>
and through js when loading I add line numbers to each line in descending order:
tr=$('.mable tr.t').length; //alert(tr); //tr=0; $('.t').each(function(){ $(this).append('<div class="tr-number">'+tr+' эт.</div>'); tr--; });
The code works as it should.
But if this table is one. If there are several tables , it shows incorrectly. In short, I don’t know how to access a table row through $(this)
inside each();