jQuery AJAX "undo helper"
<p>The common pattern in AJAX-based UIs is that when user performs an action, it is reflected in the UI instantly, but is marked as unfinished until the arrival AJAX response confirming that everything is OK. This is how e.g. adding an event in Google Calendar works. And when there is an error, that temporary UI change is reverted.</p>

<p>Now, doing such reversion manually is not too creative, so I suspect that there is some "undo helper" in jQuery, which allows to preserve the state of UI elements, and then restore it - kind of attribute stack or something like that. This don't even has to have anything to do with AJAX.</p>

<p>Is there anything like that?</p>
