Disclaimer: I am the author of the time.
Unfortunately, as PetersenDidIt noted, timeago does not currently support runtime parameters. There was an open problem on GitHub, but I did not have time to look into it. PetersenDidIt, Thanks for the pull request. I'll see as soon as I can.
Meanwhile, there may be one of several possible workarounds ...
First set the suffix to the default empty string:
$.timeago.settings.strings.suffixAgo = "";
Then run timeago as usual:
$("time.timeago").timeago()
Finally, instead of adding the "nosuffix" qualifier, add a class to each timestamp for which you want to get a suffix, and add a suffix to all of these timestamps once:
$("time.timeago.suffix").after(" ago")
source share