一段JS代码的注释
fx.Layout = Class.create(); // 为 fx 增加 Layout 属性fx.Layout.prototype = Object.extend(new fx.Base(), { // 为Layout 增加
initialize: function(el, options) {
this.el = $(el);
this.el.style.overflow = "hidden";
this.iniWidth = this.el.offsetWidth;
this.iniHeight = this.el.offsetHeight;
this.setOptions(options);
}
});
fx.Height = Class.create();
Object.extend(Object.extend(fx.Height.prototype, fx.Layout.prototype), {
increase: function() {
this.el.style.height = this.now + "px";
},
toggle: function() {
if (this.el.offsetHeight > 0) this.custom(this.el.offsetHeight, 0);
else this.custom(0, this.el.scrollHeight);
}
});
----------------------------------
忘大家帮看看 写在注释