Joke Collection Website - Public benefit messages - Help, modify the countdown time specified in jquery.
Help, modify the countdown time specified in jquery.
& lt! DOCTYPE? html & gt
& lthead & gt
& ltmeta? t_ '? +? Me? +?' "? class="cntDigit "? /& gt; ').css({
Height:? options.digitHeight? *? options.digitImages? *? 10,?
Floating:? Left'? Background:? url(\ ' '? +? Options. Images? +?' \')',
Width:? options . digit width });
Digits.push (element);
Margin (c,? -((parse int(options . start time[I])? *? options.digitHeight? *
options . digitimages)));
Number [c] __max? =? 9;
Switch? (options.format[i])? {
Case? h ':
Number [c] __max? =? (c? %? 2? ==? 0)2:? 9;
What if? (c? %? 2? ==? 0)
Number [c] __condmax? =? 4;
Break;
Case? d ':
Number [c] __max? =? 9;
Break;
Case? m ':
Case? s ':
Number [c] __max? =? (c? %? 2? ==? 0)5:? 9;
}
++ c;
}
Or what?
elem? =? $(' & lt; div?' class = " CNT separator "/& gt; ). css({float: left'})
. text(options . start time[I]);
where.append(elem)
}
};
var? Margin? =? Function (elem, val)?
{
What if? (Val? ! ==? Undefined)
Return? Numbers [elements]. css({'marginTop ':? Val. +? px ' });
Return? ParseInt (number [elem].css('marginTop'). Replace ('px',? ''));
};
var? moveStep? =? Function (elem)?
{
Numbers [elements]. _ digitInitial? =? -(number [element]). __max? *? options.digitHeight? *? options . digitimages);
Return? Function? _move()? {
mtop? =? Margin (elem)? +? options.digitHeight
What if? (mtop? ==? options.digitHeight)? {
Margin (elem, number [element]. _ digitial);
What if? (elem? & gt? 0)? moveStep(elem? -? 1)();
Or what?
{
ClearInterval;
For what? (var? I = 0; ? Me? & lt? Numbers. Length; ? i++)? Margin (me,? 0);
options . time rend();
Return;
}
What if? ((elem? & gt? 0)? & amp& amp? (Numbers [elements]. __condmax? ! ==? Undefined)? & amp& amp?
(digits [elem? -? 1]._ digitInitial? ==? Margin (elem? -? 1)))
Margin (elem,-(number [element]). __condmax? *? options.digitHeight? *? options . digitimages));
Return;
}
Margin (elem, mtop);
What if? (elem)? /? options.digitHeight? %? options.digitImages? ! =? 0)
setTimeout(_move,? options . step time);
What if? (mtop? ==? 0)? Numbers [elements]. __ismax? =? True;
}
};
$. extension (options, user options);
this.css({height:? options.digitHeight,? Overflow:? Hide'});
create digits(this);
Interval? =? setInterval(move step(digits . length? -? 1),? 1000);
};
$(function(){
var? Now = new? date();
var? My date = new? Date ("20 13", "10",? "8"); //Note that the month starts from 0. 10 stands for 1 1 month.
var? timeLeft? =? New? Date (my date-now);
var? startTimeString? =? time left . getdate()+":"+time left . get hours()+":"+time left . get minutes()+":"+time left . get seconds();
$('#counter ')。 Countdown ({
Picture:? /jscss/demo img/20 1309/digits . png ',
Start time:? startTimeString
});
$('#counter_2 ')。 Countdown ({
Picture:? /jscss/demo img/20 1309/digits . png ',
Start time:? startTimeString,
Time trend:? function(){? Alert ('End!' ); ? },
Format:? mm:ss
});
});
& lt/script & gt;
& lt style? type="text/css " >
Br {Clear:? Both; }? . cntSeparator{font-size:? 54px? Margin:? 10px? 7px? Color:? #000; }? . Desc {deposit:? 7px? 3px}? . desc? div{float:? Left; ? Font series:? Arial? Width:? 70px? Right margin:? 65px? Font size:? 13px; ? Font thickness:? Bold; ? Color:? #000; }
& lt/style & gt;
& lt/head & gt;
& ltbody & gt
& ltdiv? id = " counter " & gt& lt/div & gt;
& ltdiv? class="desc " >
& ltdiv & gt Diaz & lt/div >
& ltdiv & gtHoras & lt/div & gt;
& ltdiv & gtMinutos & lt/div & gt;
& ltdiv & gtSegundos & lt/div & gt;
& lt/div & gt;
& ltbr? /& gt;
& ltbr? /& gt;
& ltbr? /& gt;
& ltdiv? id="counter_2 " >& lt/div & gt;
& ltdiv? class="desc " >
& ltdiv & gtMinutos & lt/div & gt;
& ltdiv & gtSegundos & lt/div & gt;
& lt/div & gt;
& lt/body & gt;
& lt/html & gt;
- Related articles
- Which brand of dog shower gel is good?
- Why can't the US Mission find Jiaozuo City?
- How to find a mobile phone in Redmi k30pro?
- Hello! The number you dialed has activated the reminder service! We'll text him! What does this mean?
- What are the New Year messages? What short messages are there?
- When does the south campus of HSBC College start?
- The court sent a text message and closed the case.
- How to activate Netease Cloud Music Free Traffic
- When can I put strategic advertisements in the sand table course?
- What is the most popular and domineering nickname of Tik Tok in 202 1 year?