简体   繁体   English

jquery从上到下滑动

[英]jquery sliding from top to bottom

http://jsfiddle.net/Hx65Q/3/ I want the slider not come from left side, but it must open itself from top. http://jsfiddle.net/Hx65Q/3/我希望滑块不是来自左侧,但它必须从顶部打开。 How to do this? 这个怎么做?

$("button" ).click(function() {
    $('.login').toggle('slide', {  duration: 1000,   easing: 'easeOutBounce', 
    });
});

It is possible and quite easy to achieve, using direction: 'up' . 使用direction: 'up'可以很容易地实现。

$("button").click(function () {
    $('.login').toggle('slide', {
        duration: 1000,
        easing: 'easeOutBounce',
        direction: 'up'
    });
});

JsFiddle demo JsFiddle演示

Try this simple code. 试试这个简单的代码。

$("button" ).click(function() {
    $('.login').slideToggle( {
  duration: 1000,
  easing: 'easeOutBounce', 
});
});

Demo 演示

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM