Can't get Countdown to work
See original GitHub issueThis 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:
- Created 9 years ago
- Comments:6 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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>
.Yeah, wrapping the code in $(document).ready() makes it work. Thank you very much for help!