Created
June 30, 2014 21:13
-
-
Save coreyward/e34898d09968f5aa4aa6 to your computer and use it in GitHub Desktop.
Non-blocking iFrame loads, because Vimeo embeds are slow to load, and iFrames block onLoad firing (and thus negatively impact pageload measurements).
This file contains hidden or 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
| # Non-Blocking iFrames | |
| $ -> | |
| $('iframe[data-src]').each -> | |
| this.setAttribute 'src', this.getAttribute 'data-src' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment