All pastes #525974 Raw Edit

Something

public text v1 · immutable
#525974 ·published 2007-05-31 16:35 UTC
rendered paste body
Fx.Puff = Fx.Base.extend({
	
	initialize: function(el, options) {
		this.element = $(el);
		this.element.setStyle('overflow', 'hidden');
		this.setOptions(options);
		this.initWidth = this.element.getStyle('width').toInt();
		this.initHeight = this.element.getStyle('height').toInt();
		this.mLeft = this.element.getStyle('margin-left').toInt();
		this.mTop = this.element.getStyle('margin-top').toInt();
		this.fSize = this.element.getStyle('font-size').toInt();
	},
	
	puff: function() {
		return this.element.effects(this.options).start({
			'width': this.initWidth * 2,
			'height': this.initHeight * 2 ,
			'margin-left':  this.mLeft - (this.initWidth * .5),
			'margin-top': this.mTop - (this.initHeight * .5),
			'font-size': this.fSize * 2,
			'opacity': 0
		});
	}
});