I know that this issue seems similar to many that preceded it, but the main difference is that I still want to go to the url that's in the anchor's href
and direct them to another page.
Here's my code:
<a class="tile" href="https://www.weather.com">weather<a/>
When the anchor is clicked, it jumps to the top of the page right before the user is redirected to the url in the href
I've tried adding this to the JS to resolve it, but to no avail.
this.el.addEventListener('click', (e) => {
e.preventDefault();
window.location = this.el.getAttribute('href');
}, false);
Any help would be appreciated.