Widget:Timer: Difference between revisions
Jump to navigation
Jump to search
Matt Pijoan (talk | contribs) No edit summary |
Matt Pijoan (talk | contribs) No edit summary |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
var countdownCurrent = | var countdownTimer, countdownCurrent = 30000; | ||
$.getScript("http://wikidoc.org/includes/jquery.timer.js", function (){ | |||
$(document).ready(function(){ | $(document).ready(function(){ | ||
countdownTimer = $.timer(function() { | countdownTimer = $.timer(function() { | ||
var min = parseInt(countdownCurrent/6000); | var min = parseInt(countdownCurrent/6000); | ||
Line 20: | Line 19: | ||
} | } | ||
}, 70, true); | }, 70, true); | ||
}); | }); | ||
$('#Go').click(function() { | $('#Go').click(function() { | ||
countdownTimer.toggle(); | |||
}); | }); | ||
function pad(number, length) { | function pad(number, length) { | ||
Line 32: | Line 29: | ||
return str; | return str; | ||
} | } | ||
}); | |||
</script> | </script> | ||
<span class='countdowntime'></span> | <span class='countdowntime'></span> |