jQuery-Countdown
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:A fancy countdown timer for jQuery
# jQuery Countdown

A simple jQuery plugin for creating a countdown timer. Example:

```js
$(function(){
	
	var note = $('#note'),
		ts = new Date(2012, 0, 1),
		newYear = true;
	
	if((new Date()) > ts){
		// The new year is here! Count towards something else.
		// Notice the *1000 at the end - time must be in milliseconds
		ts = (new Date()).getTime() + 10*24*60*60*1000;
		newYear = false;
	}
		
	$('#countdown').countdown({
		timestamp	: ts,
		callback	: function(days, hours, minutes, seconds){
			
			var message = "";
			
			message += days + " day" + ( days==1 ? '':'s' ) + ", ";
			message += hours + " hour" + ( hours==1 ? '':'s' ) + ", ";
			message += minutes + " minute" + ( minutes==1 ? '':'s' ) + " and ";
			message += seconds + " second" + ( seconds==1 ? '':'s' ) + " 
"; if(newYear){ message += "left until the new year!"; } else { message += "left to 10 days from now!"; } note.html(message); } }); }); ``` For more examples go to the plugin homepage on [Tutorialzine](http://tutorialzine.com/2011/12/countdown-jquery/).

本源码包内暂不包含可直接显示的源代码文件,请下载源码包。