css
Hide/show table rows using JavaScript
I wanted have a HTML table where toggle the visibility of its rows (TR elements) using display:block. This is wrong. You need to use display:table-row.
Without using the table-row property, the TR will not have the proper column widths. This is a problem when using Firefox or other Gecko-based browser.
Improper vs. Improper way to hide or show a TR element using javascript.
Sample Table
<table>
<tr id="showme" style="display:none"> <td>I am in a row</td>
</tr>
</table>
test = document.getElementById("showme"); test.style.display = ‘block’; //wrong test.style.display = ‘table-row’; //correct
Recent blog posts
- Amazon S3 Website CNAME
- Button labels for checkout
- Insert html django contrib messages
- Twitter Bootstrap not working with LESS.js
- Javascript libs that offer basic subset of jquery features
- Building the donor-matic
- Playing with free Google Map alternatives.
- Some flows are not as complicated as they appear
- Form design crib sheet
- Script to get IE9 Windows Virtual PC images into Virtual Box