This script stops working the moment I add a table inside a table, so how to get it worked? I don\'t need any jQuery solutions, I want pure JavaScript. Here\'s my sc
If you can leverage the col tag the solution, in pure JavaScript, is straightforward:
2 two deux zwei
3 three trois drei
4 four quattre vier
5 five cinq fÜnf
6 six six sechs
You can apply to col just a couple of CSS attributes, but visibility is one of them:
function show_hide_column(col_no, do_show) {
var tbl = document.getElementById('id_of_table');
var col = tbl.getElementsByTagName('col')[col_no];
if (col) {
col.style.visibility=do_show?"":"collapse";
}
}
References: