Last active
August 29, 2015 14:20
-
-
Save VincentVToscano/d746d30918fed218d9ee to your computer and use it in GitHub Desktop.
Safari 6 - 7.1.3 SVG Background Redraw Fix
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
/** | |
* Vincent V. Toscano | |
* Safari redraw fix --- Must be placed after the element is available. | |
* Notes: | |
* 1. Solution to the issue where Safari will not show animated SVG sprite sheet used as a background image of element until | |
* until the user interacts with the page/element. | |
* 2. This has been tested on Safari 6 - 7.1.3 | |
* 3. Adjust timing to suite your needs | |
* 4. Enact this technique only once for any element that will not show/present on screen. | |
*/ | |
setTimeout(function(){document.body.style.padding='0px'},300); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment