Edit in JSFiddle

var button = document.querySelector('.click-to-toggle');

button.addEventListener('click', function (event) {

    var next = this.nextElementSibling;

    if (next.style.display == "none") {
        next.style.display = "block";

    } else {
        next.style.display = "none";
    }
});
<h2 class="click-to-toggle">Toggle This Dropdown</h2>

<ul style="display:none">
    <li><a href="#">How To Do This</a>

    </li>
    <li><a href="#">Installing in The Mid 90s</a>

    </li>
</ul>
.click-to-toggle{
    cursor: pointer
}