Support unloading timeago elements. fixes #40#90
Support unloading timeago elements. fixes #40#90dshafer wants to merge 1 commit intormm5t:masterfrom
Conversation
Adds explicit untimeago() function that removes all timeago timers and data. Hooks jQuery.events.special.remove to automatically call untimeago() Note, this does not handle automatically removing timeago timers if the DOM elements are removed by some means other than $().remove()
|
This fix is working, thank you. |
|
Useful Commit. Would like to see this in timeago. |
|
I'm sorry for not keeping up with this project lately. I like the idea behind this PR, but it needs some rebasing first. The core codebase has changed a bit, and it would probably be better to use our new functions convention instead of instead of Brainstorming:
|
|
You should also look at #30 - that's been helpful for us in dealing with leaks. The idea is that you should be able to call |
Adds explicit untimeago() function that removes all timeago timers and data.
Hooks jQuery.events.special.remove to automatically call untimeago() when elements are removed from the DOM
Note, this does not handle automatically removing timeago timers if the DOM elements are removed by some means other than $().remove()
My earlier commit on issue 40 had a bug when calling untimeago() on non-timeago elements. This single commit includes the untimeago implementation with the fix for that bug (i.e. the earlier commit should be disregarded)