Created
May 31, 2012 23:55
-
-
Save TastyToast/2847317 to your computer and use it in GitHub Desktop.
Changing WMode with jQuery
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
$("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