mardi 20 janvier 2015

Using jquery, how can I hide all table rows that are not checked?

I have a html table with a column of checkboxes. I have a button (that says "Show only selected rows" and on the button click I want to hide all rows where the checkbox in that row is not checked


Here is an example of my html:



<button id="mybutton">Show only Selected Rows</button>

<table>
<tr><td><input class="test" type=checkbox value=100></td></tr>
<tr><td><input class="test" type=checkbox value=100></td></tr>
<tr><td><input class="test" type=checkbox checked value=100></td></tr>
</table>




Aucun commentaire:

Enregistrer un commentaire