mercredi 29 mars 2017

change all checkboxes in one table-row

I want to uncheck all checkboxes that are in one table row. I have this HTML code :

<tr id="unlosta_line_1">
     <td>
        <input id="unlosta_prop_id_1" name="unlosta_prop_id[1]" value="1"  checked="checked" type="checkbox">
Feld 1
     </td>

     <td>
        <input id="unlosta_prop_id_2" name="unlosta_prop_id[2]" value="2"  type="checkbox">
Feld 2
     </td>

     <td>
        <input id="unlosta_prop_id_3" name="unlosta_prop_id[3]" value="3"  type="checkbox">
Feld 3
     </td>
     <td>...and so on
     <td>
</tr>

What I have tried at now is this jquery code:

$("tr#unlosta_line_1").children("td").each(function(i) { $(i).prop("checked", false) } )




Aucun commentaire:

Enregistrer un commentaire