I am currently working on a website similar to www.romneymakes.com. I'd like to create a function which simulates the red banner to the right of the website. I want to program a counter which increments every second.
I tried to work the programming out in a blank web page, but the code won't work. I'd like to know if someone can help me. The code I am using is pasted below.
function counter() {
var per_sec = c.per_second, num_of_sec = 0, total;
per_sec += 0.74;
num_of_sec++;
var seconds = Math.floor(num_of_sec / 10);
total = per_sec * seconds;
window.alert( total );
}
setInterval('counter', 1000);