Skip to content

Instantly share code, notes, and snippets.

@erikig
Created February 3, 2012 17:06
Show Gist options
  • Save erikig/1731169 to your computer and use it in GitHub Desktop.
Save erikig/1731169 to your computer and use it in GitHub Desktop.
jquery.wmodeFix.js - Fix wMode for embedded YouTube iFrames
/**
* Fix wMode for embedded YouTube iFrames
**/
function wmodeFix(){
$('iframe[src*="youtube"]').each(function() {
var iframe_src = $(this).attr('src') + '?wmode=transparent';
$(this).attr("src",iframe_src);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment