I have a video section that is setup as follows:
One video shows up by default when the page loads
There are two tabs of content - each tab holds a list of video thumbnails. When you click on one of the thumbnails, the default video disappears and the video that was clicked shows up in it's place.
I'm using a bit of code I found here: Flash video still playing on DIV that is removed using jQuery (IE bug) - to remove the video and clone it because I was having an issue in IE where the previous video was still playing even though the new video was being loaded.
Now in IE9, the first tab column of videos will not swap out. The second tab column however will.
This is the HTML:
<div class="video-holder">
<div id="video17" class="large-video" style="display: none;">
<div class="embed-video">the video</div>
</div>
<div id="video18" class="large-video" style="display: none;">
<div class="embed-video">the video</div>
</div>
<div id="video19" class="large-video" style="display: none;">
<div class="embed-video">the video</div>
</div>
<div id="video20" class="large-video" style="display: none;">
<div class="embed-video">the video</div>
</div>
</div>
<ul>
<li><a href="#video-tab1">Tab 1</a></li>
<li><a href="#video-tab2">Tab 2</a></li>
</ul>
<div id="video-tab1">
<a href="#" id="link17" class="video-link">thumbnail</a>
<a href="#" id="link18" class="video-link">thumbnail</a>
</div>
<div id="video-tab2">
<a href="#" id="link19" class="video-link">thumbnail</a>
<a href="#" id="link20" class="video-link">thumbnail</a>
</div>
And here is the JS:
jQuery(".large-video").hide(); //hides all the .large-video divs
jQuery("#video17").show(); // this is the default video to show
jQuery(".video-link").click(function(e){
e.preventDefault();
$(".large-video").hide()
$("#video"+$(this).attr("id").replace("link","")).show();
var clone = $(".large-video").clone(true);
$(".large-video").remove();
$(".video-holder").html(clone);
});
Thank you for any help you can provide!!!