rollback chain
rollback chain
hello everyone!
so here is the idea: give user a way to rollback jQuery chain
implementation in some cases is trivial but in other is just
impossible so here is my suggestion:
jQuery(selector [,object [,{rollback: true}]])
.css("color", "blue" /* on this step jquery object should save
original value of color attribute? */)
.toggle(/* just call toggle again? */)
.each( function() {},
function() {} /* second function is user-made rollback if
user want the transaction to be rollbackable */)
i think this might be useful trick