Skip to content

Instantly share code, notes, and snippets.

@TastyToast
Created May 31, 2012 23:55
Show Gist options
  • Save TastyToast/2847317 to your computer and use it in GitHub Desktop.
Save TastyToast/2847317 to your computer and use it in GitHub Desktop.
Changing WMode with jQuery
$("embed").attr("wmode", "opaque");
var embedTag;
$("embed").each(function(i) {
embedTag = $(this).attr("outerHTML");
if ((embedTag != null) && (embedTag.length > 0)) {
embedTag = embedTag.replace(/embed /gi, "embed wmode="opaque" ");
$(this).attr("outerHTML", embedTag);
} else {
$(this).wrap("<div></div>");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment