GabiMe
GabiMe

Reputation: 18473

Youtube embedded video keeps hiding my JavaScript popup dialogs

I tried playing with z-index, and also tried setting the wmode to "opaque". Nonthing worked..

It keeps hiding my popup dialogs..

Here is the current iframe code

<iframe title="YouTube video player" class="youtube-player" type="text/html" width="450" height="297" src="http://www.youtube.com/embed/glqpoDfuAwk" frameborder="0" ></iframe>

EDIT: As pointed out below, using "embed" and opaque wmode solves the problem. But I cannot find any solution for YouTube's new style of embedding using iframe

Upvotes: 3

Views: 961

Answers (2)

Kim Christensen
Kim Christensen

Reputation: 77

You can still add the wmode when dealing with an iframe. Add

?wmode=transparent 

to the iframe src-parameter. This fixed it for me.

Upvotes: 1

gblazex
gblazex

Reputation: 50109

The flash embed code still works (Demo):

<object width="640" height="385">
    <param name="movie" value="http://www.youtube.com/v/vx2u5uUu3DE"></param>
    <param name="allowFullScreen" value="true"></param>
    <param name="allowscriptaccess" value="always"></param>
    <param name="wmode" value="opaque"></param>
    <embed src="http://www.youtube.com/v/vx2u5uUu3DE" 
         type="application/x-shockwave-flash" allowscriptaccess="always"
         allowfullscreen="true" width="640" height="385" wmode="opaque"></embed>
  </object>

Upvotes: 2

Related Questions