I am trying to add flip effect for divs using css CodePen Example
But the change will be that I will be trying to add the css animation dynamically through javascript.
Here is what I have tried. The transform propery seems to be working, but the animation duration to see the animation happening is not working. Any suggestions on that part. am i adding the correctly?
$('body').html('<div class="card-container"><div id = "myDiv" class="flipper"><div class="front"> <h1>Hello</h1></div><div id="backDiv" class="back"> <h1>World</h1></div></div></div>');
document.getElementById("myDiv").style.transform = "rotateX(360deg)"
document.getElementById("myDiv").style.WebkitTransform = "rotateX(360deg)"
document.getElementById("myDiv").style.msTransform = "rotateX(360deg)";
document.getElementById("backDiv").style.transform = 'rotateX(180deg)';
document.getElementById("myDiv").style.transition = 'transform 6s ease-out'