rendered paste bodyElement.extend({ fadeOut: function(options, remove) { return this.effect('opacity', options).start(0).chain(function() { if (remove) this.remove(); }.bind(this)); }, fadeIn: function(options) { return this.effect('opacity', options).start(0, 1); }, highlight: function(from, to, options) { if (!this.$.highlight) { this.$.highlight = this.effect('background-color', $merge({wait: false}, options)); var org = this.getStyle('background-color'); } else { var org = this.$.highlightOrg; } to = to || ((org == 'transparent') ? false : org) || 'fff'; this.$.highlight.start(from, to).chain(function() { this.setStyle('background-color', org); this.$.highlightOrg = null; }.bind(this)); }});