previous

page 3

next
<script src='move.js'></script>

I forgot to add the above line to the head section of my index.html.
Did you remember?

Click card 6 for a demo.

To be able to repeat this trick, we'll need to remove the move class when the transition finishes. Here's how:

<img src='cards/1.png' id='0' class='card' onTransitionEnd='remove_move(this);'>

... on each of the first five cards of course.

function remove_move(el) {
el.classList.remove('move');
}

All being well the cards should now spring back to their original positions ready for the next move.

Click card 6 for a demo.

previous
next