I’m trying to “tweek” the TimeAgo plugin so that I can remove the suffix “ago” on a case by case basis.
Here’s what I’ve tried
$("time.timeago-nosuffix").timeago({suffixAgo: ""});
and
$("time.timeago-nosuffix").timeago({ settings: { strings: { suffixAgo: null}} });
as well as
$(document).ready(function () {
$("time.timeago").timeago();
$("time.timeago-nosuffix").timeago(function () {
suffixAgo: ""
});
});
with out any luck.
Just set
suffixAgoto a blank stringUPDATE
Looks like the current version of the plugin doesn’t handle runtime options. I created a fork of the git repository and created a version that does:
https://github.com/petersendidit/jquery-timeago/blob/master/jquery.timeago.js