I've been dedicating several hours to finding a solution, but nothing has worked so far.
My goal is to set up an animation where the user clicks on a square image, causing it to 'flip' into a trapeze shape similar to the new Windows logo. At the same time, another div will slide out to the right from behind this element, displaying information related to the image.
While I have created a working example on my website, it currently only functions in webkit browsers due to the lack of vendor prefixes and the div behind not sliding out correctly yet. However, the concept is clear - something akin to the Windows 8 start screen tiles.
The animation I am using is flipInY from animate.css with the removal of the middle keyframes. Originally, I planned to use Hover to trigger the animation, but implementing this on a mobile site would be challenging. Therefore, I opted for a jQuery 'onClick' event as a better alternative.
Although I have successfully implemented the onClick switchClass JQuery function for the first animation, the second click merely restarts the animation rather than reversing it. I had the code here, but I removed it in search of a more effective solution that remains elusive.
This question and answer provide some insight into the issue, although it pertains to a different 'slideUp' animation and involves two separate buttons. I prefer to have a single button that toggles the effect.
Any assistance would be greatly appreciated, and if you believe I am approaching this task in the wrong manner, please feel free to suggest an alternate approach!