I want to insert a rowspan after every first td in every table, but I can’t.
I started searching and made this code. It doesn’t work, but may tell more about thing I need.
$("table").each(function(){
var rowcount = $("tr").length;
var insert = ('<td rowspan="' + rowcount + '" class="table-rowspan"> </td>')
$("table td:first").after(insert);
});
Hiya please try this demo http://jsfiddle.net/kAzfQ/ updated demo http://jsfiddle.net/kAzfQ/3/
Solution will add columns
foooafter every first td one first row. Demo includes 2 table.Please let me know if I am missing anything,
Hope this helps,
Note You can add row count back I have excluded it for this demo. to show you the
tdappend after first row first td. B-)code