替换mootools 1.3中的bindwithevent函数(从1.2升级)
各位, 由于 MooTools 1.3 现已发布,我将更新一些脚本。 BindWithEvent 现已弃用,必须更换,但是如何更换呢?
看到这个:
new Element('div', [.....]).addEvent('click',this.close.bindWithEvent(this,true));
我很确定它必须是某种函数
new Element('div', [.....]).addEvent('click',function (event) { ????? } );
但是如何与上部关闭事件绑定?
Dear all,
as MooTools 1.3 is out now, i´m going to update some scripts. BindWithEvent is now deprecated and has to be replaced, but how?
See this:
new Element('div', [.....]).addEvent('click',this.close.bindWithEvent(this,true));
I´m quite sure it has to be some sort of a function
new Element('div', [.....]).addEvent('click',function (event) { ????? } );
But how to bind with the upper close event?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
来自 docs,
函数方法:
bindWithEvent
此函数已被弃用。
如何替换此方法的示例:
From the docs,
Function method:
bindWithEvent
This function has been deprecated.
Example how you could replace this method: