Skip to content

Instantly share code, notes, and snippets.

@odenijs
Created June 26, 2013 12:38
Show Gist options
  • Save odenijs/5867064 to your computer and use it in GitHub Desktop.
Save odenijs/5867064 to your computer and use it in GitHub Desktop.
Add wmode query variable to iframe source with jQuery
$('iframe').each(function() {
var source = $(this).attr('src');
var wmode = "wmode=opaque";
if (source.indexOf('?') != -1) {
$(this).attr('src', source + '&' + wmode);
} else {
$(this).attr('src', source + '?' + wmode);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment