Div sliding down with button and disappearing after scrolling down


#1

Hello everyone,

I would like to know how to reveal a div after clicking on the angle-down button which would disappear in the same way as in Quora (when you click on one answer from the home page, you can make it disappear either by clicking the x button at the bottom or if you scroll down long enough).

A little image to illustrate :

Hope someone will be able to help me!

Have a nice day,
Pierre


#2

If I’m following, you’re looking for something like a accordion component?

There are several way to build this from dynamic classes or using Angular 2s animation class.
What have you tried so far?