I want to disable my button on click and then reenable in after 5 seconds but its not working properly.
function submitPoll(id){ document.getElementB
.delay is jQuery. You can simply use setTimeout in Javascript.
.delay
setTimeout
function submitPoll(id){ document.getElementById("votebutton").disabled = true; setTimeout(function(){document.getElementById("votebutton").disabled = false;},5000); }