Trying to figure out the best way to do this. I have a main video player pulling in a video from Vimeo. Underneath this main player is thumbnails of other videos. When the user clicks on a thumbnail I want it to make that thumbnail video take the place of the main video.
Vimeo embeds are all iFrame based. I'm not sure if I should be replacing the whole iFrame, or just the URL etc. Also the size difference between the main on and the thumbnail; not sure if that will get carried across automatically or the Vimeo code will be clever enough to resize. And can the Jquery click override the click the thumbnail usually expects to play the small video?
HTML
<div class="blogPlayer">
<iframe src="#" width="528" height="297" frameborder="0"></iframe>
</div>
<ul class="blogThumbnails>
<li><iframe src="#" width="160" height="90" frameborder="0"></iframe></li>
<li><iframe src="#" width="160" height="90" frameborder="0"></iframe></li>
<li><iframe src="#" width="160" height="90" frameborder="0"></iframe></li>
</ul>
This jQuery is completely untested and done on the spot, but was thinking something along the lines of...
$('.blogThumbnails li').click(function(){
var video = $(this).html();
$('.blogPlayer').replaceWith('video');
})