Created
July 10, 2014 08:32
-
-
Save BenRichter/6c0b4eabebf4d3add003 to your computer and use it in GitHub Desktop.
IE iframe z-index fix (z.B. Youtube)
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
jQuery(function ($) { | |
/** | |
* | |
* IE iframe fix z-index | |
* | |
**/ | |
function ieIframeFix(){ | |
$("iframe").each(function () { | |
var ifr_source = $(this).attr('src'); | |
var wmode = "wmode=transparent"; | |
if (ifr_source.indexOf('?') != -1) $(this).attr('src', ifr_source + '&' + wmode); | |
else $(this).attr('src', ifr_source + '?' + wmode); | |
}); | |
} | |
$(document).ready(function () { | |
ieIframeFix(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment