Pkira
8/5/2016 - 8:36 AM

Hide and show html elements

Hide and show html elements

<!-- Hide elements -->
<div id="divCheckbox" style="display: none;">

<!-- OR in HTML5 -->
<div hidden>This div is hidden</div>

<!-- Javascript -->
<script type="text/javascript">
   function toggle_visibility(id) {
       var e = document.getElementById(id);
       if(e.style.display == 'block')
          e.style.display = 'none';
       else
          e.style.display = 'block';
   }
</script>