Any equivalent of this in pure js? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

Any equivalent of this in pure js?

$(".quote-text").animate({ opacity: 0 }, 500, function() { $(this).animate({ opacity: 1 }, 500); $('#text').text(randomQuote.quote); } );

17th May 2020, 10:28 PM
Sajid
Sajid - avatar
1 Antwort
+ 2
You can setTimeout(). That is what jquery uses under the hood. But if it helps there is an experimental feature animate() supported in all major browsers except IE and safari mobile https://developer.mozilla.org/en-US/docs/Web/API/Element/animate
17th May 2020, 11:24 PM
Ore
Ore - avatar