私はこのようなオブジェクトを持っています:
function ImageHolder(Attributes, Parent)
{
this.Id = Attributes['Id'];
this.Parent = Parent;
this.Element = $('<div/>');
this.msg = "hello world";
this.Parent.append(this.Element);
this.handleDrop = function(e, ui)
{
alert(this.msg);
};
this.Element.droppable({drop: this.handleDrop});
}
次に、次のようなオブジェクトを作成します。
holder = new ImageHolder(A,B);
しかし、要素に何かをドロップしようとすると、次のエラーが発生します。
this.msg is undefined
ここで何か間違ったことをしていますか?