Search code examples
jqueryhideslideeasing

jQuery amazing easing


How to achieve something like there:

http://ofertymieszkan.pl/

(click "DALEJ" green button in the middle and then optinally "podstawowej wyszukiwarce" below "WYSZUKAJ" button)

Element fades in and then elegantly disappears.

Any demos/ideas etc.?


Solution

  • At a quick glance, it's basically just using animate() changing the left and opacity values. Very roughly, this is what their code does:

    $('#estate_search_submit').click(function ()
    {
        $('#first-step').animate({left: '-=250', opacity: 0});
        return false;
    });
    

    http://jsfiddle.net/mattball/7yTK3/2/

    That gets the first step to slide away. I'll let you figure out how to get the second step to slide in.