jQuery slideDown with easing

北战南征 提交于 2019-12-03 05:49:12

Take a look at this page, which contains many easing functions: http://gsgd.co.uk/sandbox/jquery/easing/

Using that plugin you can do things like:

$(element).slideUp({
    duration: 1000, 
    easing: method, 
    complete: callback});

You can use the animate method with jQueryUI and the easing effects like this:

$(".demo").animate({height: "hide"}, 1500, "easeInQuad", function(){});

Easing In and Out:

            $("#SignIn").click(function () {

                $(".divSlideTop").slideDown({
                    duration: 1000,
                    easing: "easeInQuad"
                });
            });

            $("#close").click(function () {

                $(".divSlideTop").slideUp({
                    duration: 1000,
                    easing: "easeOutQuad"
                });
            });

Have a look at my pen Demo you simple to use $(element).slideUp({duration:1000});

gokhan
$('.class').slideDown(400,'easeInQuad');

Quotes not need for numeric.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!