I wish to execute different functions at different times without them overlapping with each other.
Bit of context - I want to remove elements of a page one element at a time rather than all at once over a period of time.
For example, at 1:00am remove element 1 then at 2:00am remove element 1 + 2 and so on.
The removal of the elements will be done using JQuery.
EDIT:
window.setInterval(function(){ // Set interval for checking
var date = new Date(); // Create a Date object to find out what time it is
if(date.getHours() === 12 && date.getMinutes() === 18){ // Check the time
$(function() {
//Remove Elements
$('#element1').remove();
})
}, 10000); // Repeat every 10000 milliseconds (10 seconds)
This is what I have so far for timing one function - seeing error : Uncaught SyntaxError: Unexpected token , .
setTimeout
(withinin SO or the web)}
for closing the if function