Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WriteCapture2 multiple writes in sequence
var lastWrite = $.Deferred();
lastWrite.resolve();
$.fn.write = function(html) {
return this.each(function() {
var def = $.Deferred();
var el = this;
lastWrite.then(function() {
writeCapture(el,function() { def.resolve(); }).close(html);
});
lastWrite = def;
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.