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 = 6000;
var countdownTimer, countdownCurrent = 30000;
var countdownTimer;
$.getScript("http://wikidoc.org/includes/jquery.timer.js", function (){
$(document).ready(function(){
$(document).ready(function(){
$.getScript("http://wikidoc.org/includes/jquery.timer.js", 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);
countdownTimer.play();
 
alert("init");
});
});
});
$('#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>

Latest revision as of 15:30, 7 February 2013