Advertisement
Guest User

70 second countdown timer

a guest
Mar 31st, 2014
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <title>Countdown Timer</title>
  6. <meta name="keywords" content="keyword1, keyword2, keyword3"/>
  7. <meta name="description" content="Description Here"/>
  8. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script>
  9. <style type="text/css">
  10. <!--
  11. body {
  12. margin: 0px;
  13. }
  14. p {
  15. font-family: Arial, Helvetica, sans-serif;
  16. font-size: 15px;
  17. line-height: 18px;
  18. }
  19. -->
  20. </style>
  21. </head>
  22. <!--Website Design by Plusminisites.com-->
  23. <body>
  24. <script type="text/javascript">
  25. jQuery(document).ready(function() {
  26. var sec = 70;
  27.  
  28. function formatTime(s) {
  29. var m = Math.floor(s/60); //Get remaining minutes
  30. s -= m*60;
  31. return (m < 10 ? m : m)+":"+(s < 10 ? '0'+s : s); //zero padding on minutes and seconds
  32. }
  33.  
  34. var timer = setInterval(function() {
  35. var count = sec--;
  36. $("#mdtimer span").text(formatTime(count));
  37. if (sec == 0) {
  38. $("#makingdifferenttimer").delay(1000).fadeIn(1000);
  39. $("#mdtimer").hide(1000) .fadeOut(fast);
  40. }
  41. }, 1000);
  42.  
  43. });
  44. </script>
  45. <center>
  46. <a class="button" href="http://www.downloadlink.com/" id="makingdifferenttimer" rel="nofollow" style="display: none;" target="_blank">Download</a>
  47. </center>
  48. <div id="mdtimer">
  49. <div style="font-size: large; text-align: center;">
  50. <b>Please Wait <span>1:10</span> seconds</b></div>
  51. </div>
  52. </body>
  53. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement