1<script>
2 const timeout = document.getElementsByClassName('classname')
3 setTimeout(hideElement, 1000) //milliseconds until timeout//
4 function hideElement() {
5 timeout.style.display = 'none'
6</script>
7<div class="classname">
8 <span> × </span>