Good day pro. Tell me, I now use the function "hide table" by clicking on the link. Where I insert id="hide_this" - the element (table) disappears.
The question is, how do I do the opposite
- first the table is hidden,
- And when you click on the link, it appears?
Code:
function toggle() { if( document.getElementById("hidethis").style.display=='none' ){ document.getElementById("hidethis").style.display = ''; }else{ document.getElementById("hidethis").style.display = 'none'; } } Link:
<a href="#null" toggle() onclick="toggle()">Показать отделы:</a> The fact that we hide:
<table id="hidethis">