Last active
December 28, 2015 20:09
-
-
Save lvl-svasseur/7555138 to your computer and use it in GitHub Desktop.
Force Repaint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* source : http://stackoverflow.com/questions/3485365/how-can-i-force-webkit-to-redraw-repaint-to-propagate-style-changes | |
*/ | |
sel.style.display='none'; | |
sel.offsetHeight; // no need to store this anywhere, the reference is enough | |
sel.style.display='block'; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment