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. How to do this?

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

Upvotes: 0

Views: 78

Answers (2)

SarathSprakash
SarathSprakash

Reputation: 4624

Try this simple code.

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

Demo

Upvotes: 1

MasterAM
MasterAM

Reputation: 16478

It is possible and quite easy to achieve, using direction: 'up'.

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

JsFiddle demo

Upvotes: 1

Related Questions