开发者

Youtube videos in jQuery dialogs always on top of other content

开发者 https://www.devze.com 2023-03-12 05:42 出处:网络
I am having some troubles embedding videos in a jQuery dialog. It displays and plays all well but it is always in front of other dialogs. When I pass another dialog over the one with th开发者_运维知识

I am having some troubles embedding videos in a jQuery dialog. It displays and plays all well but it is always in front of other dialogs. When I pass another dialog over the one with th开发者_运维知识库e video the video stays on top of everything... Can anyone help?


Your issue has nothing to do with jQuery or JavaScript. It has to do with the z-index of a Flash object.

I've used this solution before with success...

http://manisheriar.com/blog/flash_objects_and_z_index

  • Put your Flash content into a wrapper div called flash

  • Add <param name="wmode" value="transparent"> to your object tag

  • Add wmode="transparent" into the embed tag

  • Use CSS to set the position and z-index for your div (don't set negative z-index values as it will hide your Flash)

CSS

#flash {
    position: relative; /*or absolute*/
    z-index: 0;
}

HTML

<div id="flash">
    <object .... >
        <param name="wmode" value="transparent">
        <embed .... wmode="transparent">
    </object>
</div>
0

精彩评论

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