SHOW:
|
|
- or go back to the newest paste.
1 | $(".btn").click(function () { | |
2 | if ($('tr#' + $(this).data("href")).is(":visible")) { | |
3 | $('tr#' + $(this).data("href")).remove(); | |
4 | } else { | |
5 | - | $(this).closest('tr').after('<tr id="' + $(this).data("href") + '"><td colspan="5">' + $('#' + $(this).data("href")).html() + '</td></tr>'); |
5 | + | $(this).closest('tr').after('<tr id="' + $(this).data("href") + '"><td colspan="' + ($(this).closest("tr").find("td").size()) + '">' + $('#' + $(this).data("href")).html() + '</td></tr>'); |
6 | } | |
7 | }); |