Adds/removes classes for the hide/show transition, rather than the JS setInterval method of the other version
jQuery 3.4.1, HTML, CSS, JavaScript
No-Library (pure JS), HTML, CSS, JavaScript