Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Safari 6 - 7.1.3 SVG Background Redraw Fix
/**
* 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