title: How to hide the table when i click button using js?
body: <p>First of all the view page shows only two buttons leave and attendance.
  when i click the leave button i shows the table(tb2).and again i click the that button it hide the table
  <a href="https://i.stack.imgur.com/SMcPv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SMcPv.png" alt="enter image description here"></a></p>
  
  <p>When i click the attendance i display the another table(tb3).it is same as previous
  <a href="https://i.stack.imgur.com/9AtYO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9AtYO.png" alt="enter image description here"></a></p>
  
  <p>Now for me i want when i click the leave button the opened attendance table should be closed and it same for the attendance button.</p>
  
  <p>My code:</p>
  
  <pre><code>var click = document.getElementById('clickme');
  click.addEventListener('click', myfunction);
  
  function myfunction() {
     var tablewrap = document.getElementById('tb2');
     tablewrap.classList.toggle('show')
  
  };
  
  
  var click = document.getElementById('click');
  click.addEventListener('click', myfunction);
  
  function myfunction() {
     var tablewrap = document.getElementById('tb3');
     tablewrap.classList.toggle('show')
  };
  </code></pre>