문제

I am running into a weird issue and can't seem to find a solution. Using either JqueryTools tabs widget or JqueryUI tabs widget when a Youtube video is embedded it keeps overlaying it on every tab. This only occurs in IE, specifically tested with IE10. Anyone know why?

I created a jsfiddle to better illustrate this issue: http://jsfiddle.net/ncfbX/19/

Edit:

Wouldn't let me submit it without including some code, so:

HTML:

<div class="main">
    <div class="slides">Slides division</div>

    <div id="tabs">
        <ul>
            <li><a href="#tabs-1">tab1</a></li>
            <li><a href="#tabs-2">tab2</a></li>
            <li><a href="#tabs-3">tab3</a></li>            
        </ul>
        <div id="tabs-1">
            <div class="inner_panel">
                <p>working</p>
<iframe width="531" height="270" src="http://www.youtube.com/embed/7_nyhwuEX2c?rel=0" frameborder="0" allowfullscreen></iframe>
            </div>
        </div>
        <div id="tabs-2">
             <div class="inner_panel">
                 <p>Tab2 should not have a youtube video embedded.</p>     
            </div>
        </div>
        <div id="tabs-3">
             <div class="inner_panel">
                 <p>Tab3 should not have a youtube video embedded.</p>                 
            </div>
        </div>
    </div>
</div>

CSS:

.inner_panel{height:350px;}

JAVASCRIPT:

$(document).ready(function(){
   $('#tabs').tabs();
});
도움이 되었습니까?

해결책

Alright I found a fix, apparently it had something to do with Youtube not respecting the dynamically assigned z-index.

Use the following code when embedding a Youtube video under tabs inorder to get it to work correctly with IE10:

<iframe title="YouTube video player" width="480" height="390" src="[YOUR_YOUTUBE_URL_HERE]?wmode=transparent" frameborder="0" wmode="Opaque">

?wmode=transparent at the end of the URL and wmode="Opaque" as an extra parameter is what makes it work.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top