Add attribute to insert 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 abstracts on the page, and I would like to add the wmode = "opaque" attribute to all of them. However, I tried to do it like this, and it did not work:

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

Is there any other way to dynamically set the wmode = "opaque" attribute?

Thank!

+3
source share
2 answers

I started using regex instead of jquery to make this work.

0
source

Source: https://habr.com/ru/post/1745019/


All Articles