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.

TypeError: $(...).countdown is not a function

See original GitHub issue

Hi,

I was wondering if you could help me out, I’m a total jQuery rookie and I’m trying to figure out your jquery plugin. I keep on getting an error TypeError: $(…).countdown is not a function when trying to load your script. I’m just not sure what I’m doing wrong, but any help would be great!

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery Final Countdown Timer</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>
<script src="/jQuery.countdown-2.0.0/src/jquery.countdown.js" type="text/javascript"></script>
</head>


<body>
<div id="clock">Limited Time Only!</div>

<script type="text/javascript">
  $( document ).ready(function() {
      console.log( "ready!" );
         // 15 days from now!
        var date = new Date(new Date().valueOf() + 15 * 24 * 60 * 60 * 1000);
    $('#clock').countdown(date, function(event) {
        $(this).html(event.strftime('%D days %H:%M:%S'));
    });
 });
 </script>

</body>
</html>

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
shipra18commented, Nov 2, 2015

try using jQuery(document).ready(function($) { //your stuff; }

Read more comments on GitHub >

github_iconTop Results From Across the Web

$().countdown is not a function - Stack Overflow
Hello I had the same problem, and I fixed it by using. jQuery('#timeLeftDiv').countdown({ until: expires, timezone: 0 ...
Read more >
Uncaught TypeError: $(…).countdown is not a function
I have one page in my NativeChurch installation using the 'Ministry' template where the main top menu is not showing any of its...
Read more >
TypeError: core.CountdownTimer is not a constructor
CountdownTimer is not a constructor. When I made the experiment, I used a code component to write this code and set it to...
Read more >
countdown is not defined - Laracasts
I'm trying to use countdown.js with Laravel and having a few issues and hope soeone can point me in ... Uncaught ReferenceError: countdown...
Read more >
CountDown Timer not Working - Magento Stack Exchange
1 Change first line from (function($) { to require(['jquery'],function($){ 2 Change last line from }(jQuery)); to });.
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