Skip to content

Commit

Permalink
Height fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasRBowers committed Apr 15, 2015
1 parent e2ee8ae commit 5bde7c4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions responsive-tables.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@

function splitTable(original)
{
original.wrap("<div class='table-wrapper' />");
original.wrap("<div class='table-wrapper'>");

var copy = original.clone();
copy.find("td:not(:first-child), th:not(:first-child)").css("display", "none");
copy.removeClass("responsive");

original.closest(".table-wrapper").append(copy);
copy.wrap("<div class='pinned' />");
original.wrap("<div class='scrollable' />");
copy.wrap("<div class='pinned'>");
original.wrap("<div class='scrollable'>");

setCellHeights(original, copy);
setTableHeights(original, copy);
Expand All @@ -62,8 +62,8 @@
oheight = $(this).height();
cheight = $('tr:eq('+index+')', copy).height();
height = (oheight > cheight ? oheight : cheight);
$('td', original).css('height', height+'px');
$('td', copy).css('height', height+'px');
$('tr:eq('+index+') td', original).css('height', height+'px');
$('tr:eq('+index+') td', copy).css('height', height+'px');
});
}

Expand Down

0 comments on commit 5bde7c4

Please sign in to comment.