Pure JavaScript fade in function
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Hi friends i want to fade in a div when i click on another div and for that i am using following code. Code1 works fine but i require to use the Code2 . I know there is jQuery but i require to do this in JavaScript Can you guide me that what kind of mistake i am doing or what i need change... Code1 --- Works Fine function starter () { fin (); } function fin () { for ( i = 0 ; i <= 1 ; i += 0.01 ) { i = Math . round ( i * 100 )/ 100 ; setTimeout ( "seto(" + i + ")" , i * 1000 ); } } function seto ( opa ) { var ele = document .