Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

how to set timeout for a div tag in html

<script>
  const timeout = document.getElementsByClassName('classname')
  setTimeout(hideElement, 1000) //milliseconds until timeout//
  function hideElement() {
    timeout.style.display = 'none'
</script>
<div class="classname">
  <span> &times; </span>
 
PREVIOUS NEXT
Tagged: #set #timeout #div #tag #html
ADD COMMENT
Topic
Name
2+6 =