Here is my second jQuery plugin: CountDown and also third weekend project. CountDown plugin is simply calculates time different between two dates and also count down second by second.
Until parameter should be from future otherwise plugin throws an error. Another date parameter will be setted now automatically. Date formats are is the same as CountUp plugin.
Version History
v1.0: Just launched plugin.
Note: Lastest version is on github.
Example:
[code lang=”js”]$(document).ready(function(){
$(‘#jq_count_down’).countDown({"from":"now", "until": "21/12/2012-00:00:00", "lang": "en", "zero" : true, "format":"full", "message": "It finished!" });
});
Other notes:
- Don’t forget message parameter.
- 4 languages (Turkish, English, Spanish and Deutsch
- Call the plugin only with id, not class.
- Please use jQuery 1.4+ (jQuery.min is okay!)
- You may want to hide “0″ outputs, “write_zero” parameter does it.
Demo is here and plugin is on github.
Please do not hesitate for bugs and any suggestions.
thank you very much. is there a way to do a end trigger? for exp, when countdown finished on the time; call a js function like ajaxshowme();?