FLIP with `appendChild` method
monochromer opened this issue · comments
Why is flip animation not working in this example with simple dom-manipulation via appendChild
https://codepen.io/monochromer/pen/rRMLda?editors=0011
<img src="image.jpg" data-flip-key="image" />
var f = window.f = new Flipping();
var image = document.querySelector('.image');
var grid = document.querySelector('.grid');
grid.onclick = (e) => {
var gridCell = e.target.closest('.grid__cell');
if (!gridCell) return;
f.read();
gridCell.appendChild(image);
f.flip();
}
With this lib https://unpkg.com/flipping@latest/dist/flipping.web.js it's worked, but with https://unpkg.com/flipping@latest/dist/flipping.js - no