I have a gpx download in a popup set as href of an anachor tag set via Javascript. After download I want to show a DIV by setting an onclick event. Although this works in this fiddle https://jsfiddle.net/gimoya/3csxzkwn/9/ with the below approach, I can’t get the same code to work in my Leaflet application https://tiroltrailhead.com/legacy_trails/ where after clicking a trail a popup opens and the click event on the GPX-Download should make the class “kofi_reminder”, which is hidden by default, visible.
link.innerHTML = 'Click me';
link.onclick = function () {
document.getElementsByClassName("hidden")[0].style.visibility = 'visible';
};
link.href = 'test.html';
link.target = '_blank';
document.body.appendChild( link );