How to hide a table row in jQuery?

Try this

$("#headerTable tbody tr.member").hide();

The selectors in jQuery like CSS selectors, so you should be able to use them like that.

You can browse the jQuery selector documentation here, it's full of interesting things you can do.


You could also use find.

$('#headerTable').find('.member').hide();

Or if all the rows (elements, actually) with class member should be hidden:

$('.member').hide();

should work.


$("#headerTable .member").hide();


To specify a class using CSS use a dot to signify that it's a class, not a colon. The colon is used by jQuery for filters.

$("tr.member").hide();

Is just fine unless you want to be specific to a table.

Tags:

Jquery