hi i am confused with the below code
JSfiddle link
for (var i=6;i>=0;i--)
{
setTimeout((function(i)
{
$("div").delay(4000).html(i);
alert(i); //if commented unable to see the countdown
})
(i),4000);
//alert(1);
}
I am not able to get the count down timer.. whats wrong.. when "alert" is commented unable to see the count down numbers. Please somebody explain how the above code works.. Post some correct code