日期:2014-05-16 浏览次数:20453 次
ifPage : function(page){
var href = this.getHref();
if(href.indexOf(page)>-1){
return true;
}else{
return false;
}
},
getCountDown : function(){
var year = IXDC.endYear;
var month = IXDC.endMonth;
var date = IXDC.endDate;
var now = new Date()-0;
var et = new Date();
et.setYear(year);
et.setMonth(month-1);
et.setDate(date);
var aDay = 3600*24000;
var deT = et - now;
var num = Math.ceil(deT/aDay);
if(num<0){
num = 0;
}
return num;
},
go : function(e,fn){
var $e = $(e);
var i = null;
var gotoE = function(){
var t = $e.offset().top;
if(t>0){
$('body,html').animate({
'scrollTop' : t
},500);
window.clearInterval(i);
if(typeof(fn)!='undefined'){
fn();
}
}
};
i = window.setInterval(gotoE,100);
}
};