1
Hello.
I want to create a list of videos in which I will have a main video (bigger picture) and a list sequence with thumbnail of the others. However, in this thumbnail list there should be a link that causes it to click on the main video frame.
Something like:
.video {
background: #005299;
margin: 10px;
width: 480px;
height: 320px;
}
.miniatura {
background: #0091ea;
color: #fff;
margin: 10px;
width: 105px;
height: 100px;
float: left
}
<ul>
<li class="video">
<embed width="480" height="320" src="https://video.com/video.mp4">
</li>
<li class="miniatura"><a href="#">VIDEO 1</a></li>
<li class="miniatura"><a href="#">VIDEO 2</a></li>
<li class="miniatura"><a href="#">VIDEO 3</a></li>
<li class="miniatura"><a href="#">VIDEO 4</a></li>
</ul>
Well, now in this structure would have to receive a javascript script or jquery to make the links change the url of < embed > without updating the page, only I have no idea how to do it.
Someone can give me an idea there?
Oops, sounds interesting, I just saw it and I’ll test it, but one question first. The <li> thumbnails, I intend to pull from the database with PHP, while or foreach. The passing of the Ids will work?
– Rhafaew Andrade
Ai only viewing PHP, while or foreach, but can create with something like < ? php echo "id=v". $i ? >
– user60252
i use a crud, "kkk" $list = list('table', "WHERE status='1' ORDER BY id DESC LIMIT $pageReturn[1], $pageReturn[2]"); foreach ($list $video):? > <! -- structure --> <?= $video->link ? > <! -- structure --> <? endforeach; ?>
– Rhafaew Andrade
Xiiii, spoke Greek to me, hahaha
– user60252
kkk see, <?= $video->link ?> this is the echo that returns the value of the video link pulled from DB (could be any other value like <?= $video->titulo_video ?> etc.). - I will make another answer to explain better.
– Rhafaew Andrade