All pastes #449659 Raw Edit

Someone

public javascript v1 · immutable
·published 2007-04-20 11:09 UTC
rendered paste body
Element.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));	}});