Created
January 8, 2014 23:17
-
-
Save ramzesimus/8326566 to your computer and use it in GitHub Desktop.
This file contains 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
function avia_iframe_fix(container) | |
{ | |
var iframe = jQuery('iframe[src*="youtube.com"]', container), | |
youtubeEmbed = jQuery('iframe[src*="youtube.com"] object, iframe[src*="youtube.com"] embed', container).attr('wmode','opaque'); | |
iframe.each(function() | |
{ | |
var current = jQuery(this), | |
src = current.attr('src'); | |
if(src) | |
{ | |
if(src.indexOf('?') !== -1) | |
{ | |
src += "&wmode=opaque"; | |
} | |
else | |
{ | |
src += "?wmode=opaque"; | |
} | |
current.attr('src', src); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment