Hi there,
I need to show and hide functionality through javascript , how can I achieve this.
If I click on a dash link then show particular section and if I click again then it should be hide.
Is there is any script I can use?
Please reply.
Hi there,
I need to show and hide functionality through javascript , how can I achieve this.
If I click on a dash link then show particular section and if I click again then it should be hide.
Is there is any script I can use?
Please reply.
YOU CAN USE THE BELOW SCRIPT TO ACHIEVE YOUR REQUIREMENT:
function showHide(elemId)
{
if(document.getElementById(elemId).style.display == "none")
document.getElementById(elemId).style.display = "block"
else
document.getElementById(elemId).style.display = "none"
}
CALL THIS METHOD FROM YOUR LINK & SEND YOUR DIV WHICH YOU WANT TO SHOW/HIDE. FOR EAXAMPLE:
<a href="#" onclick="showHide('divcheckpoint');" >
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.