Skip to content

Instantly share code, notes, and snippets.

@coreyward
Created June 30, 2014 21:13
Show Gist options
  • Select an option

  • Save coreyward/e34898d09968f5aa4aa6 to your computer and use it in GitHub Desktop.

Select an option

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).
# 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