How can I have text fade in on each click and not just the first time using css transition and JavaScript?
Here is what I have so far
<style>
#data {
    transition: .7s;
}
</style>
<h1 id="data"></h1>
<a href="#" id="clicker">click 1</a>
document.getElementById('data').style.opacity = 0;
function go(event){
    event.preventDefault();
    document.getElementById('data').style.opacity = 1;
    document.getElementById('data').innerHTML = 'test';
}
document.getElementById('clicker').addEventListener('click', go);
 
     
     
    