Force Embeded Video Behind A JQuery Modal Dialog

Another quick one, [insert joke about sexual performance… HAHAHAHEHARHAHRAH] and I’ll probably file this under “I don’t care you if need this but I’m posting it because I have a bad memory”. When you use the jQuery Modal Dialog with an embedded video, like say something from youtube, and you have a modal dialog on the same page, you might notice that the video stays in front of the dialog. This would be considered contrary to design. Nice thing is, it’s an easy fix:

<object class="nospace" data="http://www.youtube.com/v/jU_lNNwCLp0&hl=en_US&fs=1&" height="320" type="application/x-shockwave-flash" width="400" >
  <param name="movie" value="http://www.youtube.com/v/jU_lNNwCLp0&hl=en_US&fs=1&" />
  <param name="allowFullScreen" value="true" />
  <param name="allowscriptaccess" value="always"/>
  <param name="wmode" value="opaque"/> <----- RIGHT THERE LOOK SEE IT?????
</object>

It’s the last parameter in that block. I posted the whole thing because it just seemed easier.

4 thoughts on “Force Embeded Video Behind A JQuery Modal Dialog”

  1. Thank you!

    I needed, literally, this exact script. Not only did I need that secret parameter, but I had to change the structure of my embed (I originally was using the code in the youtube embed text, which used an tag.

Comments are closed.