Any equivalent of this in pure js? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
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 ответ
+ 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