Currently, I am developing a folding hide/show animation that can be triggered using Javascript.
If you would like to take a look at the code and see a working example, please visit this link:
You can also view just the gist here: https://gist.github.com/1654665
At the moment, the open and close animations are combined within the same keyframe sets for simplicity. Once I resolve the issue of triggering the fold+unfold effect on click, I will work on splitting it into two separate animations.
I have attempted using jQuery's animate function, but it does not seem to recognize the rotate and translate CSS3/webkit properties. I also experimented with moving the animation-name property to an .unfold state and using jQuery to set
$("#stage").toggleClass("do_animation");
#stage.do_animation #topfold{
animation-name: topfold;
}
#stage.do_animation #bottomfold{
animation-name: bottomfold;
}
#stage.do_animation{
animation-name: collapse_expand;
}
I have some other approaches in mind that I plan to try out. However, I decided to reach out and ask for advice as many of you may have more expertise in this area.
Lastly, if anyone is interested in collaborating with me to refine this animation for easy integration in hiding/showing various types of content, I welcome your partnership. The animation is inspired by the one used to expand quoted text in OSX Mail, and I am determined to elevate it to that level of excellence.