我的代码中有这一行
$('#timeLeftDiv').countdown({ until: expires, timezone: 0, serverSync: serverTime, onTick: serverTime, tickInterval: 60 });它给了我这个错误
TypeError: $("#timeLeftDiv").countdown is not a functiontimeLeftDiv的内容被Ajaxily刷新。这跟这事有什么关系吗?
我在我的代码中包含了这一行
<script src="/<path>/jquery.countdown.min.js">我遗漏了什么?
发布于 2012-07-25 17:15:13
可能是丢失的</script>标签。
假设您之前已经包含了jQuery,请尝试:
<script type="text/javascript" src="/<path>/jquery.countdown.min.js"></script>发布于 2012-11-13 22:40:32
您好,我有同样的问题,我解决了它通过使用。
jQuery('#timeLeftDiv').countdown({ until: expires, timezone: 0, serverSync: serverTime, onTick: serverTime, tickInterval: 60 });正如你所看到的,我用jQuery替换了$,这是因为我在我的项目中也使用了prototype,我认为这个插件有一些冲突。
我希望它能帮上忙。
发布于 2015-11-29 17:33:49
确保在plugin.js之后包含countdown.js
<script type="text/javascript" src="js/jquery.plugin.js"></script>
<script type="text/javascript" src="js/jquery.countdown.js"></script>https://stackoverflow.com/questions/11646370
复制相似问题