I'm struggling to create a simple animation based on those old clocks with flipping numbers. I added the image below, copied from the free PSD found on Premium Pixels:
The biggest problem I am facing is creating a flipping animation using jQuery in HTML / CSS / JavaScript . The only tutorial I found is from this online article + article , which actually uses images. It splits the upper and lower half of the clock into two different sets of images and replaces them for every second passing by ...
This method is not realistic on the website because it does not provide real context for readers. I would prefer that the numbers be hard-coded in HTML and perform the animation flipping exclusively through jQuery - preferably without images, except for backgrounds. Or, to put it another way, the numbers are encoded in HTML, but the clock itself is a series of rogdex-style bg images.
I hope I explained it well enough. I struggled with this for several days, and I honestly have no idea how to approach this script. Maybe by breaking the top and bottom halves into different divs, then change the internal numbers for every second that passes? I'm pretty wealthy in jQuery, but I'm weak on animation.
Thanks in advance for your support!
source share