Merge pull request #1572 from javascript-tutorial/paroche-patch-6
Update solution.md
This commit is contained in:
commit
b43e954391
1 changed files with 1 additions and 1 deletions
|
@ -14,6 +14,6 @@ table.tBodies[0].append(...sortedRows);
|
||||||
3. Then sort them comparing by the content of the first `<td>` (the name field).
|
3. Then sort them comparing by the content of the first `<td>` (the name field).
|
||||||
4. Now insert nodes in the right order by `.append(...sortedRows)`.
|
4. Now insert nodes in the right order by `.append(...sortedRows)`.
|
||||||
|
|
||||||
Tables always have an implicit <tbody> element, so we need to take it and insert into it: a simple `table.append(...)` would fail.
|
Tables always have an implicit `<tbody>` element, so we need to take it and insert into it: a simple `table.append(...)` would fail.
|
||||||
|
|
||||||
Please note: we don't have to remove them, just "re-insert", they leave the old place automatically.
|
Please note: we don't have to remove them, just "re-insert", they leave the old place automatically.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue