I currently have a javascript counter which looks something like this towards the output.
out=
"<div id='days'><span>"+ days +"</span></div>" +
"<div id='hours'><span>" + hours +"</span><</div>" +
"<div id='mins'><span>" + mins +"</span></div>" +
"<div id='secs'><span>" + secs +"</span></div>" ;
document.getElementById('countbox').innerHTML=out;
setTimeout("GetCount()", 1000);
I was wondering what the method would be to use some jQuery for effects such as .fadeOut()
To animate the numbers, you can wrap
countbox‘s children in jQuery and call the animation, similar to what Joao said:$('#countbox').children().fadeout();and put this in your
GetCount()method.Edit:
To get the individual numbers (and corrected animation method):
$('#countbox div').children().fadeOut();Edit #2:
I added this to get what I believe is your desired effect:
var x = setInterval(function(){$('#countbox div').children().fadeOut()}, 1000);and each number fades out after it appears.