0
Based on the Onedrive website, where there is a drop-down menu on the left side that when clicked on the div Onedrive it loads the menu down; and if clicked again it returned in the first state, that is the collected menu.
I’m trying to do this animation, only using Javascript only. After much research, I saw that it is not recommended to use some timer to make these kinds of animations. The Requestanimationframe is used for that. Follows the code where I’ve already managed to do most of what I want. I think what’s happening is that I can’t stop the animation at the right time, and therefore I can’t properly manipulate the cancelRequestAnimationFrame.
In the code, what I’m trying to do is when I click the square it goes down. When I click again it goes up. And just keep making these two moves, so that I can then make a menu based on this.
Thank you.
You messed up too much: http://jsfiddle.net/smpfjwg8/. And you can do this with CSS as well.
– bfavaretto