Hey there! I'm working on a cool animation for my page that involves a star fade effect. After the animation, I want to open a link to another page on my site.
Imagine I have 3 cards on my page, and when I click on any of them, I want the same animation to play, followed by a 1500ms delay, and then the new page opens in the same tab.
I'm thinking of setting the link information in the HTML using either the a href tag or window.location, and then using a JavaScript query to retrieve that information.
I apologize if my explanation is a bit unclear, I'm still very new to JavaScript and learning as I go!
HTML
<div class="link1" window.location="index1.html"></div>
<div class="link2" window.location="index2.html"></div>
<div class="link3" window.location="index3.html"></div>
Javascript
open() {
this.isOpened = true;
this.elm.classList.add('is-opened');
this.timeStart = Date.now();
this.renderLoop();
setTimeout(function() { window.location = document.getElementsByName('window.location')}, 1500);
}