I am trying to make a pull down menu which gets displayed and vanishes on a click.
JavaScript
function visible(x) {
    var apple = document.getElementById('pulldown'+x);
    if (apple.style.display = "none")
    {
        apple.style.display = "block";
    }
}
This is working fine, but upon adding this to the above code -
else {
     apple.style.display = "none";
}
The onclick event only works once.
 
     
     
    