Struggling to get this animation to function correctly.
I have a vertical scrolling page with various sized div elements that change based on the content. The problem is that when these size changes occur, the other elements are moving abruptly. I want to smooth out this transition.
This is part of a larger project (angular) and I cannot use any external libraries. I've created a jfiddle to demonstrate the issue.
$('.close').click(function () {
$(this).parent().parent().height(0);
$(this).parent().parent().slideUp(500);// in case if you want to move the second div up.
});
In summary, the issue is not with the element whose height is changing. It's actually with the elements below it that are immediately adjusting in response to the height change.