开发者

Add attribute to embed tag using jquery

开发者 https://www.devze.com 2022-12-30 03:43 出处:网络
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 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!


Look at SWFObject

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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号