Mootools如何在完整的补间中执行代码?

发布于 2024-12-18 21:02:51 字数 181 浏览 1 评论 0原文

我有这个:

this.slides[this.slideIndex].set('tween', {duration: '3000'});
this.slides[this.slideIndex].tween('opacity', '1');

例如,我如何在效果完成后显示警报消息?

I have this:

this.slides[this.slideIndex].set('tween', {duration: '3000'});
this.slides[this.slideIndex].tween('opacity', '1');

how can i for example show an alert message after the effect has completed?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

掐死时间 2024-12-25 21:02:51

你可以使用

this.slides[this.slideIndex].set('tween', 
{
 duration: '3000',
 onComplete: function() {alert('msg');}
}

);

you can use

this.slides[this.slideIndex].set('tween', 
{
 duration: '3000',
 onComplete: function() {alert('msg');}
}

);
∞觅青森が 2024-12-25 21:02:51

您必须使用Chain 功能。

this.slides[this.slideIndex].tween('opacity', '1');
this.slides[this.slideIndex].get('tween').chain(function() {

    alert('Done...');

});

使用chain()方法,您可以链接任意数量函数的执行。请参阅此处: http://mootools.net/docs/core/Class/Class.Extras< /a>

You must use the Chain feature.

this.slides[this.slideIndex].tween('opacity', '1');
this.slides[this.slideIndex].get('tween').chain(function() {

    alert('Done...');

});

With chain() method you can chain the execution of any number of functions. See here: http://mootools.net/docs/core/Class/Class.Extras

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文