This javascript function is currently used to align all rows by matching their heights in 2 different tables. Each table has more than 1000 rows. And it takes more than 4 seconds to complete this function. Is there a faster way to match row heights of two different tables? Thanks
function alignTableRowHeights() { $('#table1 tr').each(function(i) { var rowDisplay=$(this).css("display") if(rowDisplay!="none"){
Rows in the table do not have the same height. Therefore, there must be logic to get the height of each row individually. And some lines can be hidden (for expansion and smoothing), and therefore it is necessary to check whether the line is displayed or not. The goal is to display the two tables side by side so that the visible rows remain in sync and aligned.
source share