JQuery TimeCircles - display minutes and seconds in one circle

PrincessBelle

I'm using the Jquery TimeCircles plug in (https://github.com/wimbarelds/TimeCircles) as a timer on my application, but I would like to have it so that there is only one circle with the minutes and seconds in the middle, like 15:40. I would like the seconds to keep ticking down, but the circle should animate according to the minutes only. Currently I have two circles showing the minutes and seconds.

I would like to start the timer at 50 minutes, and then countdown to 0 minutes and 0 seconds. Is there any way I can have the time display in the format MM:SS inside the one circle, and have the number of seconds ticking down, and the circle animating to the number of minutes ticking down only?

Thank you so much!

Wim Barelds

I actually had a fairly similar request the other day on github: https://github.com/wimbarelds/TimeCircles/issues/68

You could change it to something like:

var $container = $('#DateCountdown .textDiv_Minutes');
$container.find('h4').text('Time left');
var $original = $container.find('span');
var $clone = $original.clone().appendTo($container);
$original.hide();

$('#DateCountdown').TimeCircles().addListener(function(unit, value, total) {
    total = Math.abs(total);
    var minutes = Math.floor(total / 60) % 60;
    var seconds = total % 60;
    if(seconds < 10) seconds = "0" + seconds;
    $clone.text(minutes + ':' + seconds);
}, "all");

You'd need to use the TimeCircles options that make it only display the Minutes circle.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

Seconds, minutes and hours since a date

분류에서Dev

JQuery TimeCircles-한 원에 분과 초 표시

분류에서Dev

Jquery에서 TimeCircles Plugin의 현재 시간을 얻는 방법

분류에서Dev

Display file text one page at a time, wait 20 seconds, then auto-advance

분류에서Dev

converting seconds to minutes but without changing the format

분류에서Dev

Display text only for a couple seconds

분류에서Dev

pandas series use truncate get specified hours, minutes and seconds?

분류에서Dev

Countdown in hrs/minutes/seconds in php function using javascript

분류에서Dev

3 elements in a div element can't display in one line Jquery Mobile

분류에서Dev

Jquery: run function only every x seconds

분류에서Dev

How can I see which process hangs my Banana-pi for few seconds every couple of minutes?

분류에서Dev

How to get difference between 2 dates in number of days,hours,minutes and seconds

분류에서Dev

Block/prevent command if it has been executed within the last x seconds/minutes

분류에서Dev

Why does my display keep turning off every 10 minutes?

분류에서Dev

Only display hours if time is greater than 60 minutes

분류에서Dev

how to create circle that cut off one piece with css

분류에서Dev

d3 treat text and circle as one object

분류에서Dev

Rotate evenly-distributed elements placed on a circle with jQuery

분류에서Dev

how to get the value of the variable from the previous seconds of a countdown using jquery?

분류에서Dev

display:none and jquery show/slideDown

분류에서Dev

Display multiple attachment filenames with jQuery

분류에서Dev

How can I display a random image on a web-page for 2 minutes, then change images?

분류에서Dev

VBA - Access 2010 - Can't display total minutes in DD:HH:MM format if over 2 days

분류에서Dev

Display elements of an array with intervals one at the time

분류에서Dev

jquery .one ( "클릭", function ())

분류에서Dev

jQuery consolidate code into one function

분류에서Dev

jQuery fade - Display div on page load

분류에서Dev

JQuery: event listener removed after display:none?

분류에서Dev

jQuery display as its in mobile device in Magento

Related 관련 기사

  1. 1

    Seconds, minutes and hours since a date

  2. 2

    JQuery TimeCircles-한 원에 분과 초 표시

  3. 3

    Jquery에서 TimeCircles Plugin의 현재 시간을 얻는 방법

  4. 4

    Display file text one page at a time, wait 20 seconds, then auto-advance

  5. 5

    converting seconds to minutes but without changing the format

  6. 6

    Display text only for a couple seconds

  7. 7

    pandas series use truncate get specified hours, minutes and seconds?

  8. 8

    Countdown in hrs/minutes/seconds in php function using javascript

  9. 9

    3 elements in a div element can't display in one line Jquery Mobile

  10. 10

    Jquery: run function only every x seconds

  11. 11

    How can I see which process hangs my Banana-pi for few seconds every couple of minutes?

  12. 12

    How to get difference between 2 dates in number of days,hours,minutes and seconds

  13. 13

    Block/prevent command if it has been executed within the last x seconds/minutes

  14. 14

    Why does my display keep turning off every 10 minutes?

  15. 15

    Only display hours if time is greater than 60 minutes

  16. 16

    how to create circle that cut off one piece with css

  17. 17

    d3 treat text and circle as one object

  18. 18

    Rotate evenly-distributed elements placed on a circle with jQuery

  19. 19

    how to get the value of the variable from the previous seconds of a countdown using jquery?

  20. 20

    display:none and jquery show/slideDown

  21. 21

    Display multiple attachment filenames with jQuery

  22. 22

    How can I display a random image on a web-page for 2 minutes, then change images?

  23. 23

    VBA - Access 2010 - Can't display total minutes in DD:HH:MM format if over 2 days

  24. 24

    Display elements of an array with intervals one at the time

  25. 25

    jquery .one ( "클릭", function ())

  26. 26

    jQuery consolidate code into one function

  27. 27

    jQuery fade - Display div on page load

  28. 28

    JQuery: event listener removed after display:none?

  29. 29

    jQuery display as its in mobile device in Magento

뜨겁다태그

보관