Javascript event listener class with Timeline