Timeago Jquery插件不起作用
Timeago Jquery plugin not working
Jquery:
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/timeago.js" ></script>
$(document).ready(function(){
jQuery("abbr.timeago").timeago();
});
.html:
<abbr class="timeago" title="2008-07-17T09:24:17Z">July 17, 2008</abbr>
function Refresh() {
setTimeout(function(){
<?php echo 'var id = '.json_encode($_GET['id']).';'; ?>
$('#cmdz').load('cmdajax.php?id='+id);
},1000);
}
#cmdz
div 包含 abbr
标记。 timeago在加载中正常工作,但是当div刷新时,它将不起作用。
由于某种原因jQuery("abbr.timeago").timeago();
该功能不起作用。在这里你可以找到完整的代码:在ajax调用jquery函数无法正常工作之后
试试Livestamp.js。它不显眼且自动更新。您只需要提供Unix时间戳。
工作演示 http://jsfiddle.net/FFeE3/1/
您能否尝试从以下链接中获取您的时间.js以及您使用的任何特定原因jQuery("abbr.timeago").timeago();
您可以使用$("abbr.timeago").timeago();
希望这有助于休息演示应该给你更多的想法。 欢呼
脚本
<script type='text/javascript' src="https://github.com/petersendidit/jquery-timeago/raw/master/jquery.timeago.js"></script>
法典
$("abbr.timeago").timeago();
两种表示方式,以这种方式或其他方式做,但不要混合:-
jQuery(document).ready(function() {
jQuery("abbr.timeago").timeago();
});
或
$(document).ready(function() {
$("abbr.timeago").timeago();
});
相关文章:
- Phonegap 3.7.0手电筒插件没有'不起作用
- Ajax在JQuery表单插件中不起作用
- HtmlBox(jquery插件)在ajax调用中不起作用
- 使用DateTimePicker插件的JQuery不起作用
- jquery中DataTables插件中的排序不起作用
- jquery ias插件不适用于我的网站,加载更多项目不起作用
- Cordova插件在使用Framework7时不起作用
- 当我动态创建元素时,选择的插件不起作用
- 除非连接插件,否则 jQuery 代码不起作用
- jQuery基本插件不起作用
- 修复Angular数据表中的头插件不起作用
- jquery在动态表单输入上验证插件不起作用
- 简单的Javascript在Wordpress/WooCommerce插件中不起作用
- Ckeditor插件功能在使用setData(“hai”)之后不起作用;
- Angular UI日期插件:选择时不起作用
- 唤醒程序插件的PhoneGap构建代码没有'不起作用
- jQuery验证插件停止表单提交,提交按钮获胜'不起作用
- jQuery插件不起作用
- Rails-jQuery地理编码和Places自动完成插件不起作用
- jQuery Banner Rotator插件中的延迟设置不起作用