+ 2
I basically want to make the old quote fade out and then the new fade in
13 odpowiedzi
+ 3
Sajid Here is how you do it with vanilla js :
https://code.sololearn.com/W5zVksiDSjYG/?ref=app
+ 2
Just add this in body :
color: #fff;
+ 2
Wrap everything inside window.onload method.
+ 2
Do it like :
window.onload = () => {
// all codes go here
}
Also you can remove :
window.onload = randomThing
+ 1
Arb Rahim Badsa pls check again. I'm seriously stucked here.
+ 1
Sajid What do you want? Can you please explain it a bit?
+ 1
Arb Rahim Badsa I copied the code from another editor. It's showing an error of null in solo learn. Can you fix it so I can explain better?
+ 1
Arb Rahim Badsa getting another error
+ 1
@thankssssss. I was trying for a long time. But why the background changes color fast.? I want to change at the same time. Can you answer this too
+ 1
Sajid at line 39 of css code, change transition time to 2s.
+ 1
Arb Rahim Badsa still not in sync lol. I shall try to get them in sync on my own. I shall not trouble you any further. Thanks a lot for your help.
0
Arb Rahim Badsa done. I want to fade out the old quote and then get the new quote. The solution is using jQuery methods like animate and fade-in etc which I dont understand. I heard that jQuery is useless now. No one uses it. That's why im trying to do it in vanilla js
0
Use jQuery, easy pizzy