javascript - Jquery countdownTimer 插件不工作

标签 javascript jquery

我下载了这个jquery插件:http://harshen.github.io/jquery-countdownTimer/ 特别是使用从时间设置为仅分钟的反向倒计时到零计时器。 我很确定我正确地遵循了说明,但该插件不起作用。我以前从未使用过 jQuery 或插件,所以我不确定我是否遗漏了某些内容或只是做了一些完全错误的事情(或两者兼而有之)。

我的 Javascript 测试警报确实运行了。

我将附上我的代码供大家查看。不确定它是否与我的文件路径有关,但我也附上了该图像。请告诉我可能导致该问题的原因以及如何解决。谢谢。

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1"> 
	<script type="text/javascript" src="timer/LIB/jquery-2.0.3.js"></script>
	<script type="text/javascript" src="timer/jquery.countdownTimer.js"></script>	
	<link rel="stylesheet" type="text/css" href="timer/CSS/jquery.countdownTimer.css"/>
  
	<script type="text/javascript">
	
		alert("working");
    
    </script>
  
</head>
<body>

  <script type="text/javascript">
    alert("tester");
  </script>

  <div id="main"><span id="m_timer"></span></div>
	<script type="text/javascript">
		$(function()
		{
			$("#m_timer").countdowntimer({
				minutes : 2‚
				size : "lg"
			});
		})
    </script>
  
</body>
</html>

这是我的项目文件夹的图片,其中包含文件:

enter image description here

最佳答案

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1"> 
	<script type="text/javascript" src="timer/LIB/jquery-2.0.3.js"></script>
	<script type="text/javascript" src="timer/jquery.countdownTimer.js"></script>	
	<link rel="stylesheet" type="text/css" href="timer/CSS/jquery.countdownTimer.css"/>
  
	<script type="text/javascript">
	
		alert("working");
    
    </script>
  
</head>
<body>

  <script type="text/javascript">
    alert("tester");
  </script>

  <div id="main"><span id="m_timer"></span></div>
	<script type="text/javascript">
		$(function()
		{
			$("#m_timer").countdowntimer({
				minutes : 2‚
				size : "lg"
			});
		})
    </script>
  
</body>
</html>

关于javascript - Jquery countdownTimer 插件不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40500544/

相关文章:

javascript - 如何检查回调是否待处理?

javascript - 使用 Mixins 在 API 调用中的所有 Vue.js 组件中使用常量数据

javascript - 基于光标位置移动元素

javascript - jquery插件适用于一个div

javascript - 菜单项(html)将javascript加载到div中

javascript - 页面加载偏移值设置为 0。计算检查值

javascript - 在 JQuery 中处理键值对以绘制图表

javascript - 检查嵌套数组中是否存在值

jquery - 如何回传表格?

javascript - Bootstrap 大下拉菜单不同宽度大小