Giter Site home page Giter Site logo

jquery.countdown's Introduction

jquery.countdown's People

Contributors

jvandesande avatar kemar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

jquery.countdown's Issues

Time zone error

I'm getting the wrong timer value.
My time is 2017-06-07T15:45:00, Time zone "Europe / Ukraine".
In the script settings set, datetime="2017-06-07T16:00:00"
Timer shows 3 hours and 15 minutes and it's a mistake.
I can adjust my time zone 2017-06-07T15:45:00+0300, but what if the user comes from a different time zone? What will happen during the transition to winter time?
The script should be oriented to the local time of the user. Time zones must be adjusted on the server or in the script settings.
Sorry for my english :)

Pause

How can pause countdown ?

Leading zeros in hours

It would be convenient to have an option to disable the leading zero in the hours item

How can I delay to load the countdown script

I had designed a web app to give questions to answerer randomly. It has two mode,and each mode has different amounts of questions,which also corresponds to different quiz-time. So, the countdown script should be delayed to load until the server response the questions. How should I do to realize it

dd -> dd-1 and dd-2

Thx for the fantastic script. It is possible script to optimize for the display of the days from dd to dd-1 and dd-2

Reset timer after time has elapsed

Hi @kemar

We are trying to reset the timer with a loop every two minutes.

We have tried the following with no luck:

    <div><time id="my-countdown">00:02</time></div>

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <script src="http://kemar.github.io/jquery.countdown/jquery.countdown.js"></script>
    <script>
    window.jQuery(function ($) {

        // Start a countdown.
        $('#my-countdown').countDown();

        function resetCountdown(endDate) {
          // Replace the old countdown with a new one but keep the same ID!
          $('#my-countdown').countDown('destroy').replaceWith('<div><time id="my-countdown">00:02</time></div>');
          var newCountdown = $('#my-countdown');
          newCountdown.attr('datetime', endDate).countDown();
        }

        $('my-countdown').on('time.elapsed', function () {
          resetCountdown(endDate);
        });

    });
    </script>

With no luck. Any help would be greatly appreciated.

Thanks

Mark

time.elapsed doesnt fire when ended on reload

`$('.js-countdown').countDown({
separator_days: ':'
});

$('.js-countdown').on('time.elapsed, function () {
$('.video_container_outer').fadeIn();
$('.gallery_container').fadeOut();
console.log('ended');
});`

Hey!

So this code executes perfectly when the timer runs out when i'm on the page. But when i refresh the page it goes back to its original state...and the event doesn't get fired. Do you have a solution?

how to unbind timer event?

$(document).on('time.elapsed',dynamictimer, function (e) {
$.ajax({
type: "post",
dataType: "json",
async: true,
url: urlTimer,
data: $(this).closest('form').serialize(),
success: function (data) {
handleCases(data);
},
complete: function(data,s,xhr) {
$(timerClass).unbind();
}
}); //ends ajax call
});

Initiate a new countdown to the same class

I need to initiate a new instance of the countdown upon an event occurring, however it seems that calling $('.class').countDown(); a second time does not restart or initiate a new countdown. I have tried removing the time element that is generated and then initiating a new countdown on the same class but this did not work. Any ideas?

At the moment I've gotten around it by removing the entire element and recreating it, but I'm sure there must be a more elegant solution.

How do i reset the timer

Need some help...So I create the ticker and all is working...but now I added a selection list...with option for different time...on select option change, i want to reset the ticker to new time without reloading the page....But ticker doesn't not reset...

    function resetCountdown() {
        alert("reset");
        //will be passing time val
        $('.countdown').attr('datetime', '00:10:00');
        $('#allotedTimer').countDown();
    }

    $("select")
   .change(function () {
       var str = "";
       $("select option:selected").each(function () {
           str += $(this).text() + " ";
       });
       $("#itemText").text(str);
       resetCountdown();
   });

HTTPS on demo page

GitHub Pages works on HTTPS.

The page at https://kemar.github.io/jquery.countdown/ currently loads, however there is mixed content and both Chrome and Firefox will not execute the JavaScript that is loaded from an HTTP host.

Both fonts.googleapis.com and ajax.googleapis.com are available over HTTPS. Changing it will not affect functionality on the HTTP side.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.