Timeline for Adding multiple rows in an HTML table using jQuery
Current License: CC BY-SA 3.0
15 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 23, 2017 at 17:17 | history | edited | Michael Auger | CC BY-SA 3.0 |
added 4 characters in body
|
Dec 7, 2016 at 16:33 | comment | added | Michael Auger | Sorry haven't been able to test my code. You could try $('table tr:last')[0].outerHTML; | |
Dec 7, 2016 at 16:32 | history | edited | Michael Auger | CC BY-SA 3.0 |
added 6 characters in body
|
Dec 7, 2016 at 15:59 | comment | added | SierraOscar |
Doesn't html() only get the inner html?
|
|
Dec 7, 2016 at 15:40 | history | edited | Michael Auger | CC BY-SA 3.0 |
deleted 5 characters in body
|
Dec 7, 2016 at 15:40 | comment | added | Michael Auger | Ah. Good point. You could use .html(); (edited above) | |
Dec 7, 2016 at 15:37 | comment | added | SierraOscar |
would clonedRow be implicitly cast to a string though in order to append it to htmlString ? Or can you apply some sort of .toString() method in there?
|
|
Dec 7, 2016 at 15:30 | comment | added | Michael Auger | Edited the answer with the code above. | |
Dec 7, 2016 at 15:30 | history | edited | Michael Auger | CC BY-SA 3.0 |
added 420 characters in body
|
Dec 7, 2016 at 15:23 | comment | added | Michael Auger | And then in your loop do a htmlString += clonedRow | |
Dec 7, 2016 at 15:22 | comment | added | Michael Auger | Can you do something like var clonedRow = $('table tr:last').clone(true); | |
Dec 7, 2016 at 15:19 | review | First posts | |||
Dec 7, 2016 at 15:33 | |||||
Dec 7, 2016 at 15:17 | comment | added | SierraOscar | Tried saving the number to variable instead but it made no difference unfortunately, I can't create a HTML string either because the table layout is dynamic and may change so I don't know what the html will be at the time the user presses the button | |
Dec 7, 2016 at 15:13 | history | edited | Michael Auger | CC BY-SA 3.0 |
added 1 character in body
|
Dec 7, 2016 at 15:07 | history | answered | Michael Auger | CC BY-SA 3.0 |