Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="container" id="photocontainer">
- <div class="row pt-5 ">
- <div class="col-sm-3" id="photocol">
- <img src="img/Cinematography/1Jacinta-Tyler.jpg" style="width:100%" onclick="openModal();currentSlide(1)" class="hover-shadow cursor">
- </div>
- <div class="col-sm-3" id="photocol">
- <img src="img/Cinematography/2Amanda-Mark.jpg" style="width:100%" onclick="openModal();currentSlide(2)" class="hover-shadow cursor">
- </div>
- <div id="myModal" class="modal">
- <span class="close cursor" onclick="closeModal();">×</span>
- <div class="modal-content">
- <div class="mySlides" >
- <iframe src="player.vimeo.com/video/…; class="mt-5" width="740" height="316" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
- <p>
- <a href="vimeo.com/255103005"; id="clr">
- <b>Jacinta & Tyler</b>
- </a>
- By <a href="vimeo.com/beautifullifestudios"; id="clr">Beautiful Life Studios</a>
- .</p>
- </div>
- <script>
- function openModal() {
- document.getElementById('myModal').style.display = "block";
- }
- function closeModal() {
- document.getElementById('myModal').style.display = "none";
- }
- var slideIndex = 1;
- showSlides(slideIndex);
- function plusSlides(n) {
- showSlides(slideIndex += n);
- }
- function currentSlide(n) {
- showSlides(slideIndex = n);
- }
- function showSlides(n) {
- var i;
- var slides = document.getElementsByClassName("mySlides");
- var dots = document.getElementsByClassName("demo");
- var captionText = document.getElementById("caption");
- if (n > slides.length) {slideIndex = 1}
- if (n < 1) {slideIndex = slides.length}
- for (i = 0; i < slides.length; i++) {
- slides[i].style.display = "none";
- }
- for (i = 0; i < dots.length; i++) {
- dots[i].className = dots[i].className.replace(" active", "");
- }
- slides[slideIndex-1].style.display = "block";
- dots[slideIndex-1].className += " active";
- captionText.innerHTML = dots[slideIndex-1].alt;
- }
- </script>
- <iframe id="my_vide" class="embed-responsive-item" src="link_to_some_video"allowfullscreen></iframe>
- function closeModal() {
- var video = document.getElementById("vid");
- document.getElementById('myModal').style.display = "none";
- document.getElementById('vid').src = '';
- }
- // Video src
- var video_src = [
- "https://www.youtube.com/embed/sdUUx5FdySs?autoplay=1",
- "https://www.youtube.com/embed/YE7VzlLtp-4?autoplay=1"
- ];
- var current_video = "";
- var frame = document.getElementById('vid');
- // slides
- var slideIndex = 1;
- showSlides(slideIndex);
- function plusSlides(n) {
- showSlides(slideIndex += n);
- }
- function currentSlide(n) {
- showSlides(slideIndex = n);
- current_video = video_src[n-1];
- frame.src = current_video;
- }
- function closeModal() {
- document.getElementById('myModal').style.display = "none";
- document.getElementById("youVideoId").pause();
- }
Add Comment
Please, Sign In to add comment