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