Jquery:Timeago 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
ДИВ содержит abbr
тег. timeago корректно работает в onload, но когда div обновляется, он не будет работать.
по какой-то причине jQuery("abbr.timeago").timeago();
функция не работает. Здесь вы можете найти полный код: after ajax call jquery function not working properly
ссылка на jquery plug in: [ссылка] (http://timeago.yarp.com/) –