Welcome to my first post here! :)
So, I'm currently working on a project for my college where I need to create "task notes" that fade in each time I add one to an array.
.note_input {
height:255px;
width:200px;
background-image:url('../img/notebg.png');
padding-top:25px;
padding-left:10px;
display:inline-block;
animation: fadein 2s;
-webkit-animation: fadein 2s;
}
@keyframes fadein {
from {
opacity:0;
}
to {
opacity:1;
}
}
@-webkit-keyframes fadein {
from {
opacity:0;
}
to {
opacity:1;
}
}
That's the CSS for the note design.
Now, here is my JavaScript code:
function Note(){
notes_p = JSON.parse(notes_j);
var note_d = "<div>";
for (var i = 0 ; i < notes.length ; i++) {
note_d += "<span class='note_input'>" + "<div class='flow' ><p>"+notes[i].input+"</p></div></br>" + "</br>" +"Time: "+ notes[i].time + "</br>" +"Date: "+ notes[i].date;
note_d += "</span>";
};
note_d += "</div>";
document.getElementById("note_div").innerHTML = note_d;
console.log(notes_p);
}
However, I am facing an issue where each new note fades in, causing the entire array to run over. Any suggestions on how I can make only a single note appear in fade each time without interfering with the others?