admin管理员组文章数量:1335854
Jquery:
<script type="text/javascript" src=".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);
}
The #cmdz
div contains the abbr
tag. timeago working properly in onload but when the div is refreshed it won't works.
for some reason jQuery("abbr.timeago").timeago();
function not working. Here you can find full code:after ajax call jquery function not working properly
Jquery:
<script type="text/javascript" src="http://code.jquery./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);
}
The #cmdz
div contains the abbr
tag. timeago working properly in onload but when the div is refreshed it won't works.
for some reason jQuery("abbr.timeago").timeago();
function not working. Here you can find full code:after ajax call jquery function not working properly
- link to jquery plug in : link – sudeep cv Commented Jun 19, 2012 at 11:25
3 Answers
Reset to default 4Try out Livestamp.js. It's unobtrusive and auto-updating. All you need to provide is the Unix timestamp.
Working demo http://jsfiddle/FFeE3/1/
Can you please try sourcing your time ago.js from below link and any particular reason you are using jQuery("abbr.timeago").timeago();
you can use $("abbr.timeago").timeago();
Hope this helps rest demo should give you more idea. cheers
Script
<script type='text/javascript' src="https://github./petersendidit/jquery-timeago/raw/master/jquery.timeago.js"></script>
code
$("abbr.timeago").timeago();
Two way of representation, Do this way or other way but don't mix:-
jQuery(document).ready(function() {
jQuery("abbr.timeago").timeago();
});
OR
$(document).ready(function() {
$("abbr.timeago").timeago();
});
本文标签: javascriptTimeago Jquery plugin not workingStack Overflow
版权声明:本文标题:javascript - Timeago Jquery plugin not working - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742394633a2466673.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论