Add attributes to embed tag?
I have a page with about 5 embedded videos, which look like this:
<embed type="application/x-shockwave-flash" width="400" height="225" src="http://vimeo.com/moogaloop.swf?clip_id=4505537&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed>
I need to dynamically add the attribute wmode="opaque" to all embed tags.
I tried this, but it didn't work:
- $j('embed').attr('wmode','opaque');
I've also been looking at SWFObject, and tried the following, but couldn't get it to work either:
- var so = new SWFObject($j('embed').attr("src"), "flash-video", $j('embed').attr("width"), $j('embed').attr("height"), "8", "#000000");
- so.addParam("wmode", "opaque");
- so.write('embed');
Any help figuring this out would be greatly appreciated... Thanks!