Skip to content
Discussion options

You must be logged in to vote

You need to wait for the next repaint, to show you the expected results.
You can do it with setTimeout() https://codepen.io/halivert/pen/ExwzXQj or (as stated by Hiws) with requestAnimationFrame https://codepen.io/Hiws/pen/vYewJzv.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rguttersohn
Comment options

Answer selected by rguttersohn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants