Reputation: 266940
I have a regular HTML table, how can I show and hide a table row using jQuery?
Upvotes: 1
Views: 1839
Reputation: 78667
I would steer clear of the show and hide methods for table rows. They lead to bad ui effects x-browser. I have found fadeIn/Out to work much better x-browser.
Upvotes: 0
Reputation: 7036
Also, you might want to look at the .toggle() function.
$('tr:nth(5)).toggle()
This will show/hide it and continually switch...
Upvotes: 1
Reputation: 41381
Hides every 5th row:
$('tr:nth(5)).hide()
An example: http://jsbin.com/epeto
Upvotes: 4
Reputation: 21565
Just to add to Nuno's answer above, JQuery's toggle() function may also be useful to you
Upvotes: 0
Reputation: 4568
Either iterate the tr elements inside your table or add id's to your trs and calling the show/hide function in jQuery with that ID
Upvotes: 1