I want one item to be clicked when I click on a different one, but I keep seeing these complicated answers that, frankly, don't make any sense. I feel like it should be easy as this, but this doesn't work.
<div class="myElement" onclick="myFunction()"></div>
<a href="https://example.com" class="myElement2"></a>
function myFunction() {
document.getElementsByClassName('myElement2').click();
}