I'm trying to show a map when I click on an h1 element. So I wrote my code which should do the trick but nothing happens. So I went looking for my JS console in my browser and there weren't any errors so I'm kinda stuck right now. Anyone that can help me out?
my HTML:
<section class="WT1">
<h1>Wetenschap & Techniek - Ellermanstraat ↓</h1>
<div id="mapid"></div>
</section>
my JS
var touchMe = document.getElementsByTagName('h1');
touchMe.onhover = function() {
touchMe.style.cursor = 'pointer';
}
touchMe.onclick = function() {
document.getElementById('mapid').style.display = "block";
};