3

I have the following embed tag:

<embed type="application/x-shockwave-flash" width="640" height="505" src="url_to_video" allowscriptaccess="always" allowfullscreen="true"></embed>

I have about five of theses on a page, and I'd like to add the attribute wmode="opaque" to all of them. However, I tried to do it like this and it didnt' work:

$j("embed").attr('wmode','opaque');

Is there another way I can dynamically set the attribute wmode="opaque" ?

Thanks!

2 Answers 2

1

Look at SWFObject

http://www.web-site-scripts.com/flash-charts/online-manual/index.html?fcp_sample_of_usage_swfobject.html

Sign up to request clarification or add additional context in comments.

2 Comments

What am I doing wrong here? $j("embed").each(function(){ var so = new SWFObject($j(this).attr("src"), "flash-video", $j(this).attr("width"), $j(this).attr("height"), "8", "#000000"); so.addParam("wmode", "opaque"); so.write("embed"); });
are you using a different version of jquery? I just noticed the $j
0

I ened up using a regular expression instead of jquery to get this to work.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.