Search code examples
jqueryslidedown

Upside-down slideDown pushing stuff upwards


I know that there were already similar questions on how to make an upside-down slideDown, but none of them was asking how to actually push all the stuff above the element upward. What I need is that while the slideDown element is unwrapping upwards, the bottom part of this element (and also all the elements below) stays right where it is, and all the elements above move upwards.

I hope you get what I mean.

Is anything like this even possible??

Please, help.


Solution

  • This is rather CSS question. jQuery slideDown just animates height property, so if you want element to shrink upwards you can use following style combination:

    .box {
        position: relative;
    }
    .box .drop {
        position: absolute;
        bottom: 40px;
    }​
    

    When element is positioned using CSS bottom property it will expand upwards. You can look for working example here.