Adding a DIV, but with flip animation (partly working)

Adding a DIV, but with flip animation (partly working)

Hi all,

Please see this fiddle: https://jsfiddle.net/8rou42z0/

I am adding a div using jquery. This is the front side of a card (in the original code this is randomly generated so you never know what card you will get). The back side is already there. Now when adding this front card DIV by clicking the turned card, I want it to flip over from the back side to this newly added front side.

The problem atm is that it shows the new DIV immediately and then flips it away. I want it the other way around ofcourse. What am I doing wrong here?


Thanks