Created
January 11, 2019 08:30
-
-
Save jdalsem/d2dc92be521362ea4d96aa43cfc12a8d to your computer and use it in GitHub Desktop.
youtube z-index fix
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
//Fix z-index youtube video embedding | |
$("iframe").each(function() { | |
var url = $(this).attr("src"); | |
if (!url) { | |
return; | |
} | |
var parts = elgg.parse_url(url); | |
var args = {}; | |
if (parts['host'] !== undefined) { | |
if (parts['query'] !== undefined) { | |
args = elgg.parse_str(parts['query']); | |
} | |
args["wmode"] = "transparent"; | |
var split = url.split('?'); | |
base = split[0] + '?'; | |
url = base + jQuery.param(args); | |
$(this).attr("src", url); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment