Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

show hidden element javascript

<h3 id="data">Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptates, recusandae.</h3>

<button onclick="HideShowFunction()"> Hide Show </button>



  <script>
        function HideShowFunction() {
            var x = document.getElementById("data");
            if (x.style.display === "none") {
                x.style.display = "block";
            } else {
                x.style.display = "none";
            }
        }


    </script>
 
PREVIOUS NEXT
Tagged: #show #hidden #element #javascript
ADD COMMENT
Topic
Name
8+9 =