JQuery hide rows when specific column row value is null -
having next table how can utilize jquery homecoming rows person has phone no?
<table> <tr> <th>name</th> <th>phone</th> <th>e-mail</th> </tr> <tr> <td>john</td> <td>123456</td> <td>john@john.com</td> </tr> <tr> <td>joe</td> <td></td> <td>joe@joe.com</td> </tr> <tr> <td>phil</td> <td>654321</td> <td>phil@phil.com</td> </tr> </table>
e.g john , phil shown since have phone no.
$('table').parent().children().find("td:nth-child(2):empty").parent().hide();
demo here : http://jsfiddle.net/csdtesting/glwevx2u/
jquery hide show-hide
No comments:
Post a Comment