If there is a link to a DOM element, then we can use the add
method of the classList
property:
const element = document.querySelector('.after');
element.classList
.add('fade-in-animation');
References:
If there is a link to a DOM element, then we can use the add
method of the classList
property:
const element = document.querySelector('.after');
element.classList
.add('fade-in-animation');
References: