Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instantiation #8

Closed
wants to merge 3 commits into from
Closed

Instantiation #8

wants to merge 3 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Sep 14, 2014

Hey,

I've did a major rewrite of your really nice countdown timer. It should also work with the current specification.

Example for illustration:

var timer = $('#timer').final_countdown({
    seconds: {
        borderColor: '#fff',
        borderWidth: '10'
    },
    minutes: {
        borderColor: '#fff',
        borderWidth: '10'
    },
    hours: {
        borderColor: '#fff',
        borderWidth: '10'
    }
});

// Set times (start, end, now)
timer.set(new Date.now().getTime() - (15 * 1000), new Date.now().getTime() + (15 * 1000), new Date.now().getTime());

// Start the timer
timer.start();

// Stop the timer
timer.stop();

The improvements in detail:

  • returns instance of countdown object
  • counters aren't bind anymore to an id
  • redefines (set) the timers dynamically
  • start/stop timers
  • arbitrary definition of days, hours, minutes and seconds

Improvements:

  • "use strict" directive
  • JSLinted

Solves:
#5

- returns instance of countdown object
- counters aren't bind anymore to an id
- redefines (set) the timers dynamically
- start/stop timers
- arbitrary definition of days, hours, minutes and seconds

Improvements:
- "use strict" directive
- JSLinted
@gbrusella
Copy link

Looks very nice indeed!! (and much easier usage).

@ghost
Copy link
Author

ghost commented Mar 27, 2015

Thanks, but unfortunately there isn't any activity in this repo anymore. Hopefully the owners will merge this someday or I will have to empower the fork.

@wojciech-trybula
Copy link

As I understand this allows to use multiple counters on the same page. Nice!
Can you show sample HTML? I've moved those IDs to classes but it still doesn't work for me.

@ghost
Copy link
Author

ghost commented Apr 28, 2015

Have a look at my fork, I also adjusted the readme: https://github.com/zusatzstoff/jquery-final-countdown

A live example can be seen here: http://zusatzstoff.github.io/guild-wars-2-timer

@wojciech-trybula
Copy link

Thank you, it helped alot. I had to edit some bits and bobs in JS file in order to make all the circles work.

@ghost
Copy link
Author

ghost commented Jun 24, 2015

Could you create a PR with your changes on my fork?

wojciech-trybula and others added 2 commits June 25, 2015 10:23
I fixed some minor typos and circles calculations as it didn't work properly prior to these changes.
Update jquery.final-countdown.js
@alexander-heimbuch alexander-heimbuch closed this by deleting the head repository Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants