$()。countdown不是函数

I have got this line in my code

$('#timeLeftDiv').countdown({ until: expires, timezone: 0, serverSync: serverTime, onTick: serverTime, tickInterval: 60 });

and it is giving me this error

TypeError: $("#timeLeftDiv").countdown is not a function

The contents of the timeLeftDiv are refreshed Ajaxily. Does this have anything to do with it?

I have included this line in my code

<script src="/<path>/jquery.countdown.min.js">

What am I missing?

might be the missing </script> tag.

assuming you have included jQuery before, try:

<script type="text/javascript" src="/<path>/jquery.countdown.min.js"></script>

Hello I had the same problem, and I fixed it by using.

jQuery('#timeLeftDiv').countdown({ until: expires, timezone: 0, serverSync: serverTime, onTick: serverTime, tickInterval: 60 });

As you can see I replaced $ for jQuery, this is because I'm also using prototype on my project, and I think there is some sort of conflict with this plugin.

I hope it helps.

make sure you include countdown.js after plugin.js

<script type="text/javascript" src="js/jquery.plugin.js"></script>    
<script type="text/javascript" src="js/jquery.countdown.js"></script>