If you must use jQuery, then this works:
$('#ts10')
.text($('#ts11').text())
.attr('rowspan','2')
.closest('tbody')
.find('#ts11')
.remove();
JS Fiddle demo.
Or, somewhat more concisely:
$('#ts10')
.text($('#ts11').remove().text())
.attr('rowspan','2');
JS Fiddle demo.
And a slightly more...useful approach, which will merge cells of adjacent rows with the class
of two
:
$('tr td.two').each(
function(){
var that = $(this),
next = that.parent().next().find('.two');
if (next.length){
that
.text(next.remove().text())
.attr('rowspan','2');
}
});
JS Fiddle demo.