Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在一段时间前安装jquery插件_Jquery_Timeago - Fatal编程技术网

如何在一段时间前安装jquery插件

如何在一段时间前安装jquery插件,jquery,timeago,Jquery,Timeago,我似乎无法让jquery插件在一段时间前工作 这是我的密码 <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script src="jquery.timeago.js"></script> </head> <body> <abbr cl

我似乎无法让jquery插件在一段时间前工作

这是我的密码

<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="jquery.timeago.js"></script>
</head>

<body>
 <abbr class="timeago" title="19 March 2013 04:51:33 PM"></abbr>
</body>
</html>

它似乎不起作用…

将此添加到您的页面:

jQuery(document).ready(function() {
  jQuery("abbr.timeago").timeago();
});
确保按照(请参见“如何”部分)中的说明操作。

将此添加到您的页面:

jQuery(document).ready(function() {
  jQuery("abbr.timeago").timeago();
});

确保您按照(请参见“如何”部分)的说明进行操作。

您必须启动插件 像这样

jQuery(document).ready(function($){
 $("abbr.timeago").timeago()

});
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="jquery.timeago.js"></script>
</head>

<body>
 <abbr class="timeago" title="19 March 2013 04:51:33 PM"></abbr>

    <script>
    jQuery(document).ready(function($){
     $("abbr.timeago").timeago()

    });
    </script>

</body>
</html>
最终的代码如下

jQuery(document).ready(function($){
 $("abbr.timeago").timeago()

});
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="jquery.timeago.js"></script>
</head>

<body>
 <abbr class="timeago" title="19 March 2013 04:51:33 PM"></abbr>

    <script>
    jQuery(document).ready(function($){
     $("abbr.timeago").timeago()

    });
    </script>

</body>
</html>

jQuery(文档).ready(函数($){
$(“缩写为timeago”).timeago()
});

希望这有助于你启动插件 像这样

jQuery(document).ready(function($){
 $("abbr.timeago").timeago()

});
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="jquery.timeago.js"></script>
</head>

<body>
 <abbr class="timeago" title="19 March 2013 04:51:33 PM"></abbr>

    <script>
    jQuery(document).ready(function($){
     $("abbr.timeago").timeago()

    });
    </script>

</body>
</html>
最终的代码如下

jQuery(document).ready(function($){
 $("abbr.timeago").timeago()

});
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="jquery.timeago.js"></script>
</head>

<body>
 <abbr class="timeago" title="19 March 2013 04:51:33 PM"></abbr>

    <script>
    jQuery(document).ready(function($){
     $("abbr.timeago").timeago()

    });
    </script>

</body>
</html>

jQuery(文档).ready(函数($){
$(“缩写为timeago”).timeago()
});
希望这有帮助