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

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -