Filtering: How to hide/show (toggle) certain table rows on click?
问题 Assuming this table (actually it could have more columns and rows): <table id="vehicles"> <tr> <th>Type</th> <th>Color</th> <th>Wheels</th> </tr> <tr> <td>Car</td> <td>Red</td> <td>4</td> </tr> <tr> <td>Motorcycle</td> <td>Green</td> <td>2</td> </tr> <tr> <td>Bike</td> <td>Blue</td> <td>2</td> </tr> <tr> <td>Car</td> <td>Blue</td> <td>4</td> </tr> <tr> <td>Bike</td> <td>Green</td> <td>2</td> </tr> <tr> <td>Motorcycle</td> <td>Red</td> <td>2</td> </tr> </table> Now my goal is to be able to