PrototypeJS中的jQuery fadeIn函数 [英] jQuery fadeIn function in PrototypeJS

查看:138
本文介绍了PrototypeJS中的jQuery fadeIn函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Prototype的新手.如何在Prototype中编写以下jQuery代码? 预先感谢..

I am new to Prototype. How can I write the following jQuery code in Prototype? Thanks in advance..

$('#lessonid').fadeIn(function(){
   $('.exercise').css('margin-bottom', '0px');        
});

推荐答案

据我所知PrototypeJS库没有内置任何动画/效果方法.您可以使用 fade 方法执行以下操作:

As far as I'm aware the PrototypeJS library doesn't have any animation/effects methods built in. You can use Scriptaculous, which is an add-on to Prototype. That will allow you to do something like this, using the fade method:

$('lessonid').fade({
    from: 0, 
    to: 1,
    afterFinish: function() {
        $$('.exercise').setStyle({
            marginBottom: 0
        });
    }
});

这篇关于PrototypeJS中的jQuery fadeIn函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆