mattbradley / livestampjs

A simple, unobtrusive jQuery plugin that provides auto-updating timeago text to your timestamped HTML elements using Moment.js.
http://mattbradley.github.com/livestampjs
MIT License
409 stars 70 forks source link

make calling $el.livestamp idempotent #11

Closed paulbellamy closed 9 years ago

paulbellamy commented 11 years ago

If the element is already in the list to be updated we don't need to add it again as that will cause a leak.

philfreo commented 10 years ago

@mattbradley thoughts on this? I'm looking to switch from jquery-timeago because of the numerous memory leak problems that library has (no auto-unloading if the element is removed, separate timers per element, leak if you call .timeago() on the same element twice in a row, etc.).... but I was hoping that this library didn't have those same problems