Merge pull request #132 from borski/feature/updatefromdom
Adding $(el).timeago('updateFromDOM') function
This commit is contained in:
commit
9dab7dbc5a
1 changed files with 4 additions and 0 deletions
|
@ -134,6 +134,10 @@
|
||||||
update: function(time){
|
update: function(time){
|
||||||
$(this).data('timeago', { datetime: $t.parse(time) });
|
$(this).data('timeago', { datetime: $t.parse(time) });
|
||||||
refresh.apply(this);
|
refresh.apply(this);
|
||||||
|
},
|
||||||
|
updateFromDOM: function(){
|
||||||
|
$(this).data('timeago', { datetime: $t.parse( $t.isTime(this) ? $(this).attr("datetime") : $(this).attr("title") ) });
|
||||||
|
refresh.apply(this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Reference in a new issue