Skip to content

Countdown timer with negative remaining time #86

@naXa777

Description

@naXa777

Try to initialize countdown with negative remaining time (i.e. seconds > duration):

let timeLimit = 10;
let timeElapsed = 15;
let $countdown = $("#countdown").timer({
        countdown: true,
        duration: timeLimit + 's',
        seconds: timeElapsed
    });

Expected result: -5 sec
Actual result: -1:0-5 min

Demo: https://jsfiddle.net/naXa/gmcbfd4w (v0.7.1) and https://jsfiddle.net/naXa/gmcbfd4w/9 (v0.9.0)

jquery-timer-bug

It would be nice to have an endless countdown which:

  1. doesn't stop when reached 0.
  2. looks nice with negative time values.
  3. can be initialized with negative duration.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions