Say you have a button to replace paragraphs within the same area, same page.
Can you make every switch, via setting innerText
or textContent
, fade in every time?
I now use keyframes
to change its opacity from 0 to 1, but it only works for the first paragraph after the page is loaded. After that, whenever I replace the text with innerText
, the effect doesn't show at all.
All the text waiting in line is hard coded in JavaScript, not in HTML - if it makes a change.