Is it possible to install a handler for when countdown reaches 0 or something similar?
Cannot find anything in the docs.
You can use the tick.
Example:
$(function(){ var NY = Math.round((new Date('7/25/2014 22:00:00')).getTime()/1000); $('#i405').flipcountdown({ size:'sm', tick:function(){ var nol = function(h){ return h>9?h:'0'+h; } var range = NY-Math.round((new Date()).getTime()/1000), secday = 86400, sechour = 3600, days = parseInt(range/secday), hours = parseInt((range%secday)/sechour), min = parseInt(((range%secday)%sechour)/60), sec = ((range%secday)%sechour)%60; if (range <=0){
alert("Countdown has Reached 0!"); return; }
else{
return nol(days)+' '+nol(hours)+' '+nol(min)+' '+nol(sec);
document.getElementById("countdown_complete").style.visibility="hidden";}
}
});
});
This doesn't work and stays in the if clause and keeps on showing the alert