My HTML code is
<table>
<tr><td><input type="checkbox"></td><td><input type="checkbox"></td></tr>
<tr><td><input type="checkbox"></td><td><input type="checkbox"></td></tr>
<tr><td><input type="checkbox"></td><td><input type="checkbox"></td></tr>
<tr><td><input type="checkbox"></td><td><input type="checkbox"></td></tr>
<tr><td><input type="checkbox"></td><td><input type="checkbox"></td></tr>
<tr><td><input type="checkbox"></td><td><input type="checkbox"></td></tr>
<tr><td><input type="checkbox"></td><td><input type="checkbox"></td></tr>
<tr><td><input type="checkbox"></td><td><input type="checkbox"></td></tr>
</table>
My JQuery code is (Not written by me, Some Stackoverflow use helped me on it, i am thanking him)
$('TABLE TBODY TR').each(function()
{
var lastd = $(this).children('tr td:last').find('input:checkbox');
var parentlast = lastd.parent();
lastd.remove();
parentlast.append("<input type='radio'>"); // want to add the same properties of the removed checkbox
});
Please someone help me.
Hopefully this will solve your problem.
So basically it will find last checkbox remove it from the dom and than creat a new one