Im trying to append a type=checkbox to the last td of every tr
Ive been playing around with the idea of traversing in achieving this, but I have no idea if it can work. Something along the lines of this.
$('#myID tr').children("td:nth-last-of-type(1)").addClass("me");
I know this is adding a class to the element, but can it be done in a similar way to add a TYPE to the tr DOM element?
There is one or two examples out there like this one, but its all around changing the type and not adding a new one.
<table id="myID" class="myClass">
    <tr>
        <th>one</th>
        <th>two</th>
        <th>three</th>
        <th>four</th>
    </tr>
    <tr>
        <td>1</td>
        <td>2</td>
        <td>3</td>
        <td>4</td>
    </tr>
    <tr>
        <td>a</td>
        <td>b</td>
        <td>c</td>
        <td type='checkbox'></td>    <!--  **THIS IS WAHT IM AFTER**  -->
    </tr> 
</table>
<input type='button' id='but_id' value='Click Me'/>
 
     
     
     
     
     
    