2017-01-03 18:50:13 +01:00
|
|
|
var i=30;var _go=1;function stop(){_go=0;$("#timer").html("...")}function go(){if(_go){$("#form").submit()}}function timer(){var a=$("#timer").html();if(i>0){i--}a=a.replace(/\d+/,i);$("#timer").html(a);window.setTimeout(timer,1000)}$(document).ready(function(){if(activeTimer){window.setTimeout(go,10000);window.setTimeout(timer,1000)}else{stop()}});
|