Javascript examples for jQuery:Table
Select and hide all odd table rows.
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("tr:odd").hide(); });/*w ww. j a v a 2 s .com*/ </script> </head> <body> <table border="1"> <tr> <th>Company</th> <th>Country</th> </tr> <tr> <td>A</td> <td>Germany</td> </tr> <tr> <td>B</td> <td>Sweden</td> </tr> <tr> <td>C</td> <td>Mexico</td> </tr> <tr> <td>D</td> <td>Austria</td> </tr> <tr> <td>E</td> <td>UK</td> </tr> </table> </body> </html>