Skip to content

Instantly share code, notes, and snippets.

@dltacube
Last active August 25, 2017 02:18
Show Gist options
  • Save dltacube/84697f299c1f76ec0e10e7b3efa2b13d to your computer and use it in GitHub Desktop.
Save dltacube/84697f299c1f76ec0e10e7b3efa2b13d to your computer and use it in GitHub Desktop.
// adding this way adds literal text instead of DOM objects
$('table.adp-directions>tbody>tr')[step].after('<tr><td>TEXT!</td></tr>');
// this way the rows are properly added
$('table.adp-directions>tbody>tr').after(function (index, html) {
if (index == step) {
return('<tr><td>TEXT!</td></tr>')
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment