title: On click, animate the div element to the top and make it sticky
body: <p>I have a parent div, that contains multiple child divs inside it, On clicking any child element,I am trying to animate that child element from its current position to the top position according to its current parent, then after moving to the top with proper animation, I want that child element to be sticky, so that other child elements can be easily scrolled underneath it and then, if any other child element is clicked then it will animate to top and the recent child element will move back to its old position.</p>
  
  <p><a href="https://i.stack.imgur.com/okTrK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/okTrK.png" alt="Sample Image"></a></p>
  
  <p>Any help using angular and/or html and css will be really appreciative. 
  I am also attaching stackblitz angular project link for my initial code.</p>
  
  <p><a href="https://stackblitz.com/edit/angular-ivy-abbnjo" rel="nofollow noreferrer">https://stackblitz.com/edit/angular-ivy-abbnjo</a></p>
  
  <p>Thanks</p>