as i think (and the comments) … you’re new using jquery…
so with jquery its very easy… append/appendTo is what you’re looking for …
if you want to add TDs more than one table it’s not usefull to use ID attributes. because W3C says that IDs are unique on a page… better use the class attribute…
<table class="floatTable">
<tbody>
<tr class="footerRow">
</tr>
</tbody>
</table>
// Select all TRs in the floatTable having the class footerRaw
$('.floatTable tr.footerRaw').each(function(key, el)) {
// here you could define anything whatever you want
var tdContent="Lorem ipsum dolor";
// For example add five TDs to your table
for ( var i = 0; i < 5; i++ ) {
// if it works ;-)
// ...it should add following:
// <td>Lorem ipsum dolor #1</td>
// <td>Lorem ipsum dolor #2</td>
// ...and so on...
$(this).append('<td>' + tdContent + ' #' + i + '</td>');
}
});
here’s an running example… http://jsfiddle.net/2am6wcm8/
3
solved Create