question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't get Countdown to work

See original GitHub issue

This simple tryout doesn’t do anything on Firefox 32.0.3, no console messages, nothing. Any ideas what might be wrong? I verified that all the components load properly and that the code actually executes. The same behaviour in IE 8. jQuery is 1.11.1.

<!doctype html>

<html>

<head>
  <title>Test</title>
  <script type="text/javascript" src="/nh/js/jquery.js"></script>
  <script type="text/javascript" src="/nh/js/jquery.countdown.min.js"></script>
  <script type="text/javascript" src="/nh/js/cdown.js"></script>
  <script type="text/javascript">
    $("div#clock").countdown("2014/10/29");
  </script>
</head>

<body>
<p>Countdown:</p>

<div id="clock"></div>

</body>

</html>

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hilioscommented, Oct 27, 2014

Hey bro, look at this fiddle, the only difference is that I execute the code at DOMready.

Your problem is that you’re trying to execute the countdown when the <div /> wasn’t created, you have three options, bind to execute the script to dom ready event, bind to load event or move the <script> tag to the end of your <body>.

0reactions
boreklcommented, Oct 27, 2014

Yeah, wrapping the code in $(document).ready() makes it work. Thank you very much for help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Use The NEW Instagram Story Countdown Sticker!
Your browser can't play this video. Learn more. Switch camera.
Read more >
How to Use Instagram Countdown Stickers To Drive Sales For ...
Instagram Story Countdown Stickers are a great way to get your followers engaged and excited for an upcoming announcement or event...
Read more >
13 Things to Know About Instagram's Countdown Sticker
Wondering how to use Instagram's Countdown Sticker? Read the post to know everything about it.
Read more >
Countdown timers no longer working properly : r/Instagram
For the last couple of weeks it's really been playing up, it will work at first but a few hours later you try...
Read more >
Countdown timer doesn't work - WordPress.org
The topic 'Countdown timer doesn't work' is closed to new replies. Countdown Time block - Display event's date into a timer. Frequently Asked...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found