Skip to content

Adding $(el).timeago('updateFromDOM') function #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2013

Conversation

borski
Copy link
Contributor

@borski borski commented Jun 12, 2013

We use Knockout.js to automatically update the DOM's values for 'title' or 'datetime' when a date changes, and we needed to be able to refresh the timeago status when the DOM changes.

@rmm5t
Copy link
Owner

rmm5t commented Jun 16, 2013

Could you help me understand this a bit more? Do you need this because the underlying datetime attribute (HTML5) and/or title attribute (micoformat) is getting overwritten?

@borski
Copy link
Contributor Author

borski commented Jun 16, 2013

Yup. So the idea is that we have a binding on our abbr element that will update the title attribute if the underlying viewmodel changes. When that happens, we want to be able to force a refresh of the element based on the new title.

rmm5t added a commit that referenced this pull request Jun 16, 2013
Adding $(el).timeago('updateFromDOM') function
@rmm5t rmm5t merged commit 9dab7db into rmm5t:master Jun 16, 2013
@rmm5t
Copy link
Owner

rmm5t commented Jun 16, 2013

@borski Okay. Merged in. There's now also a 1.3.0 release that incorporates this.

Warning: One of these days, I'm going to get around to a v2 rewrite of timeago. I'm not sure this feature will exist in the same form when that time comes. I'm so busy right now though, I have no idea when that will happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants