HWD
HWD

Reputation: 1629

Add attribute to embed tag using jquery

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!

Upvotes: 3

Views: 1928

Answers (2)

HWD
HWD

Reputation: 1629

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

Upvotes: 0

Related Questions