Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
- <title>Untitled</title>
- <script type="text/javascript" src="js/jquery.js"></script>
- <script type="text/javascript" src="js/jquery.countdown.js"></script>
- <script type="text/javascript" src="js/jquery.countdown-pl.js"></script>
- </head>
- <body>
- <p>
- <div id="ocountdown">
- <div class="time"></div>
- <div class="next_term" title="2012-10-16"></div>
- </div>
- <script type="text/javascript">
- $(function() {
- var alreadyExpired = false;
- var sTime = $('div.next_term').attr('title');
- sTime = sTime.split("-");
- austDay = new Date(sTime[0], sTime[1], sTime[2], 20, 03, 59); // gg:mm:ss USTAW GODZINĘ
- $('#ocountdown div.time').countdown({
- until: austDay,
- layout:'<span class="h">{h10}{h1}</span>:<span class="m">{m10}{m1}</span>:<span class="s">{s10}{s1}</span>',
- serverSync: serverTime,
- onExpiry: timeOrderExpiry,
- alwaysExpire: true
- });
- function timeOrderExpiry() {
- alreadyExpired = true;
- var nextTime = $('div.next_term').attr('title');
- nextTime = nextTime.split("-");
- nextTime[2]++;
- nextTime = nextTime[0]+'-'+nextTime[1]+'-'+nextTime[2];
- $('div.next_term').attr('title').html(nextTime);
- }
- function serverTime() {
- var time = new Date();
- return time;
- }
- });
- </script>
- </p>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment