jquery-autosave icon indicating copy to clipboard operation
jquery-autosave copied to clipboard

best way to clean up / stop autosave behavior?

Open philfreo opened this issue 12 years ago • 5 comments

philfreo avatar Jan 18 '13 19:01 philfreo

I'm working on a full rewrite of this plugin which will make this easier, you can monitor progress here: https://github.com/kflorence/jquery-autosave/tree/2.0

kflorence avatar Jan 18 '13 19:01 kflorence

@kflorence what's the status on your rewrite? is it working as well as the original currently?

philfreo avatar Jan 18 '13 19:01 philfreo

It's not production ready yet. It will use the jQuery promise pattern and allow handlers to have setup and teardown methods in addition to the method that is called on save which will help with performing necessary tasks before and after handlers are needed.

I'll ping you again here when it's in a usable state.

kflorence avatar Jan 18 '13 19:01 kflorence

In the meantime, the best way of cleaning up autosave depends on how you are using it, but in general timers should be stopped and the instance should be decoupled from the DOM.

kflorence avatar Jan 18 '13 19:01 kflorence

Can you please provide me a code example of how we can clear the timer and uninitiate autosave?

SanjayDalvi avatar Mar 17 '16 23:03 SanjayDalvi