title: Javascript Disable button and reenable it after 5 seconds
body: <p>I want to disable my button on click and then reenable in after 5 seconds but its not working properly.</p>
  
  <pre><code>  function submitPoll(id){
        document.getElementById("votebutton").disabled = true;
        document.getElementById("votebutton").delay(5000).disabled = false;
    }
  </code></pre>