var until = $("#time").html();
function updateTime() {
$("#time").html(
date("d", until) + " day(s)<br />" +
date("h", until) + " hour(s)<br />" +
date("i", until) + " minute(s)<br />" +
date("s", until) + " second(s)"
);
}
setInterval("updateTime(until)",1000);
Everytime I run this, I get this error:
Uncaught ReferenceError: until is not defined
(anonymous function)
I can’t see whats wrong. I’ve tried to google a lot, but every page that I find, says that setInterval() is right.
Closures: