css - javascript - innerHTML with fade in -


with following line of code:

document.getelementbyid("mydiv").innerhtml=txt; 

is possible add .fadein("slow" ) function? new text fade in.

do js+css. css transition fade in.

you need have font-color set background-color. first change content, change color normal font color.

your js:

document.getelementbyid("mydiv").innerhtml=txt; document.getelementbyid("mydiv").style.color = "#333333"; 

your css:

#mydiv {     color: #ffffff;     transition: color 2s ease 0s; } 

Comments

Popular posts from this blog

html - height not adding height to a empty div -

Oracle SQL. How to select specific IDs where value of columns specify criteria? -

python - Robot Framework location and name of keyword -