Guest User

Index.html

a guest
Oct 24th, 2012
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
  5. <title>Untitled</title>
  6.  
  7.  
  8. <script type="text/javascript" src="js/jquery.js"></script>
  9. <script type="text/javascript" src="js/jquery.countdown.js"></script>
  10. <script type="text/javascript" src="js/jquery.countdown-pl.js"></script>
  11. </head>
  12.  
  13. <body>
  14. <p>
  15.  
  16. <div id="ocountdown">
  17. <div class="time"></div>
  18. <div class="next_term" title="2012-10-16"></div>
  19. </div>
  20.  
  21.  
  22.  
  23. <script type="text/javascript">
  24.  
  25. $(function() {
  26.  
  27. var alreadyExpired = false;
  28. var sTime = $('div.next_term').attr('title');
  29.  
  30. sTime = sTime.split("-");
  31. austDay = new Date(sTime[0], sTime[1], sTime[2], 20, 03, 59); // gg:mm:ss USTAW GODZINĘ
  32.  
  33. $('#ocountdown div.time').countdown({
  34. until: austDay,
  35. layout:'<span class="h">{h10}{h1}</span>:<span class="m">{m10}{m1}</span>:<span class="s">{s10}{s1}</span>',
  36. serverSync: serverTime,
  37. onExpiry: timeOrderExpiry,
  38. alwaysExpire: true
  39. });
  40.  
  41. function timeOrderExpiry() {
  42. alreadyExpired = true;
  43. var nextTime = $('div.next_term').attr('title');
  44.  
  45. nextTime = nextTime.split("-");
  46. nextTime[2]++;
  47. nextTime = nextTime[0]+'-'+nextTime[1]+'-'+nextTime[2];
  48.  
  49. $('div.next_term').attr('title').html(nextTime);
  50.  
  51. }
  52.  
  53. function serverTime() {
  54. var time = new Date();
  55. return time;
  56. }
  57.  
  58.  
  59.  
  60. });
  61.  
  62. </script>
  63.  
  64.  
  65. </p>
  66. </body>
  67. </html>
Advertisement
Add Comment
Please, Sign In to add comment