diff --git a/jquery.restable.css b/jquery.restable.css index 6300954..3bc18de 100644 --- a/jquery.restable.css +++ b/jquery.restable.css @@ -4,7 +4,11 @@ ul.tabletolist { } /* Table with no row headers */ ul.tabletolist.nrh { - text-align: center; + border-bottom: 2px solid #ddd;resize +} +/* Table with no row headers columns */ +ul.tabletolist.nrh > li { + border-top: 2px solid #ddd; } /* Table defaults */ ul.tabletolist, ul.tabletolist ul { diff --git a/jquery.restable.js b/jquery.restable.js index ad7e694..e4dacfc 100644 --- a/jquery.restable.js +++ b/jquery.restable.js @@ -37,18 +37,19 @@ index++; - if (!$result[value]) { - $result[value] = {}; - } if (s.rowHeaders) { + if (!$result[value]) { $result[value] = {}; } $result[value][$row.children('td:nth-child(1)').text()] = $row.children('td:nth-child(' + (index + 1) + ')').text(); } else { - $result[value][$row_number] = $row.children('td:nth-child(' + index + ')').text(); + if (!$result[$row_number]) { $result[$row_number] = {}; } + $result[$row_number][value] = $row.children('td:nth-child(' + index + ')').text(); } }); }); + + console.log($result); // Crea la lista $list = $('