javascript - Timeago Jquery plugin not working - Stack Overflow

Jquery:<script type="textjavascript" src=".7.2.min.js"><script><s

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

Share Improve this question edited May 23, 2017 at 12:06 CommunityBot 11 silver badge asked Jun 19, 2012 at 11:22 sudeep cvsudeep cv 1,0277 gold badges20 silver badges34 bronze badges 1
  • link to jquery plug in : link – sudeep cv Commented Jun 19, 2012 at 11:25
Add a ment  | 

3 Answers 3

Reset to default 4

Try 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();
});

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742394640a4435697.html

相关推荐

  • javascript - Timeago Jquery plugin not working - Stack Overflow

    Jquery:<script type="textjavascript" src=".7.2.min.js"><script><s

    23小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信