Javascript-форум (https://javascript.ru/forum/)
-   jQuery (https://javascript.ru/forum/jquery/)
-   -   Секундомер - старт и стоп (https://javascript.ru/forum/jquery/48781-sekundomer-start-i-stop.html)

SLameN 16.07.2014 17:04

Секундомер - старт и стоп
 
Использую такой секундомер: http://git.wimbarelds.nl/TimeCircles/readme.php

<div id="DateCountdown"  style="width: 100%;"></div>
<div class="example stopwatch" data-timer="900"></div> <button class="btn btn-success start">Start</button> <button class="btn btn-danger stop">Stop</button> <button class="btn btn-info restart">Restart</button>


<script type="text/javascript">
<!--
	$("#DateCountdown").TimeCircles({
	   
    "animation": "smooth",
    "bg_width": 1.2,
    "fg_width": 0.1,
    "circle_bg_color": "#60686F",
    "time": {
        "Days": {
            "text": "Дней",
            "color": "#FFCC66",
            "show": true
        },
        "Hours": {
            "text": "Часов",
            "color": "#99CCFF",
            "show": true
        },
        "Minutes": {
            "text": "Минут",
            "color": "#BBFFBB",
            "show": true
        },
        "Seconds": {
            "text": "Секунд",
            "color": "#FF9999",
            "show": true
        }
    }
     
    
});
-->
</script>


Куда мне вставить этот код, чтобы кнопки применялись к моему секундомеру?
$(".example.stopwatch").TimeCircles(); $(".start").click(function(){ $(".example.stopwatch").TimeCircles().start(); }); $(".stop").click(function(){ $(".example.stopwatch").TimeCircles().stop(); }); $(".restart").click(function(){ $(".example.stopwatch").TimeCircles().restart(); });


Часовой пояс GMT +3, время: 06:28.