mirror of
https://github.com/scratchfoundation/jquery-timeago.git
synced 2025-02-17 00:20:32 -05:00
Added support for updating locale titles
The 'update' method now also updates the "title"-attribute when 'localeTitle' is enabled.
This commit is contained in:
parent
d52af89018
commit
eee58806aa
1 changed files with 3 additions and 1 deletions
|
@ -132,7 +132,9 @@
|
|||
}
|
||||
},
|
||||
update: function(time){
|
||||
$(this).data('timeago', { datetime: $t.parse(time) });
|
||||
var parsedTime = $t.parse(time);
|
||||
$(this).data('timeago', { datetime: parsedTime });
|
||||
if($t.settings.localeTitle) $(this).attr("title", parsedTime.toLocaleString());
|
||||
refresh.apply(this);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue