1
You can do it this way:
function mostraDiv(num) {
document.getElementById('div1').style.display='none';
document.getElementById('div2').style.display='none';
document.getElementById('div3').style.display='none';
document.getElementById('div'+num).style.display='block';
}
.hiddenEl{display:none;}
<div class="sidebarContainer">
<button class="imagens" onclick="mostraDiv('1')">Mostra Div 1</button>
<button class="imagens" onclick="mostraDiv('2')">Mostra Div 2</button>
<button class="imagens" onclick="mostraDiv('3')">Mostra Div 3</button>
</div>
<div class="mainContainer">
<div id="div1">Sou a div1</div>
<div id="div2" class="hiddenEl">Sou a div2</div>
<div id="div3" class="hiddenEl">Sou a div3</div>
</div>
Then just make the modifications to your size, changing the buttons for divs
and inserting images into them as preview thumbnails of the video that the user will see, by clicking on the button/image intended and also popular the divs
with the content (titles, videos etc).
I created here an example on Jsfiddle simple but well elaborated of how this will work with the respective titles and videos for each button, to have an idea.
Probably what you’re looking for is a Single Page Application that dynamically changes the video without having to reload the page. One of the frameworks used to produce Spas and the [tag:Angularjs]
– Omni
do you already use jQuery or another JS frame, like Angular? Or are you just working with pure css/js? Do you have any restrictions on using any of them?
– celsomtrindade
In the video click you can change the video src to the video you need and put the title as well.
– Gabriel Rodrigues