The question is to write a code in pure javascript that allows you to add and delete a class every certain n seconds. Here is the code I actually work with, but the method I used fails and time gets lost. I will be glad to any help.
<script> var scaleElem = document.getElementById('par_mak'); setInterval(myMethod_one, 6000); function myMethod_one( ) { scaleElem.classList.add('infi_anim'); } setInterval(myMethod_second, 12000); function myMethod_second( ) { scaleElem.classList.remove('infi_anim'); } </script> The idea is that the element would move with a certain frequency, to attract attention.