Note that there are some explanatory texts on larger screens.

plurals
  1. POyoutube's embeded video wont go behind other elements
    primarykey
    data
    text
    <p>I have a site that has YouTube's embedded video in it, my problem is, these videos don't obey the z-index rules. All the YouTube videos are displayed on top of all other elements. I tried</p> <pre><code>$('iframe','.video_container').attr('wmode','opaque'); $('iframe','.video_container').attr('z-index','1'); </code></pre> <p>I found that the wmmode has to be changed to opaque, but isn't this for the old embedded videos?? How do i achieve this for both old embedded style videos and the new iframes??</p> <p><strong>Edit:</strong> Even this didn't work on old embedded videos</p> <pre><code>$('object','.video_container').append('&lt;param name="wmode" value="opaque"&gt;&lt;/param&gt;').find("embed").attr('wmode', 'opaque'); </code></pre> <p>this works on iframe videos</p> <pre><code>var src=$('iframe','.video_container').attr('src'); if(src.indexOf('?')==-1) { src=src+'?wmode=transparent'; } else { src=src+'&amp;wmode=transparent'; } $('iframe','.video_container').attr('src',src); </code></pre> <p>but i still haven't found a way for old embed videos This is the resultant code after manipulating using js that doesn't work</p> <pre><code>&lt;object width="320" height="240"&gt; &lt;param name="movie" value="http://www.youtube.com/v/-SNytfkJD4U?version=3&amp;hl=en_US&amp;rel=0"/&gt; &lt;param name="allowFullScreen" value="true"/&gt; &lt;param name="allowscriptaccess" value="always"/&gt; &lt;embed src="http://www.youtube.com/v/-SNytfkJD4U?version=3&amp;hl=en_US&amp;rel=0" type="application/x-shockwave-flash" width="320" height="240" allowscriptaccess="always" allowfullscreen="true" wmode="opaque"/&gt; &lt;param name="wmode" value="opaque"/&gt; &lt;/object&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload