var bottomStack = function () {
"use strict";
...
jQuery('#bottomstacktitle', this.frame).bind('click', this.toggleFrame);
};
var = bottomStackExtends = {
...
toggleFrame: function (animate) {
"use strict";
if (false !== animate) {
animate = true;
}
this.frame[((animate) ? 'animate' : 'css')]({bottom: (this.bottomStackClosed ? -180 : 0)});
jQuery.cookie("bottomStackClosed", (!this.bottomStackClosed).toString());
},...
};
当它运行时,调试器会说:“未捕获的异常:TypeError:无法将'this.frame'转换为对象”。是的,因为这个“this”不是那个“this”,但是这个“this”是 jQuery('#bottomstacktitle', this.frame)。那么我可以合并到这个“this”,例如:.frame 标签吗?
我试过了:
var bottomstacktitle = jQuery('#bottomstacktitle', this.frame);
bottomstacktitle.frame = this.frame;
bottomstacktitle.bind('click', this.toggleFrame);
但不工作
你有什么解决办法吗?
谢谢!