Guest User

Untitled

a guest
Jul 22nd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.91 KB | None | 0 0
  1. <div class="container" id="photocontainer">
  2. <div class="row pt-5 ">
  3. <div class="col-sm-3" id="photocol">
  4. <img src="img/Cinematography/1Jacinta-Tyler.jpg" style="width:100%" onclick="openModal();currentSlide(1)" class="hover-shadow cursor">
  5. </div>
  6. <div class="col-sm-3" id="photocol">
  7. <img src="img/Cinematography/2Amanda-Mark.jpg" style="width:100%" onclick="openModal();currentSlide(2)" class="hover-shadow cursor">
  8. </div>
  9.  
  10. <div id="myModal" class="modal">
  11. <span class="close cursor" onclick="closeModal();">&times;</span>
  12. <div class="modal-content">
  13. <div class="mySlides" >
  14. <iframe src="player.vimeo.com/video/…; class="mt-5" width="740" height="316" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
  15. <p>
  16. <a href="vimeo.com/255103005"; id="clr">
  17. <b>Jacinta & Tyler</b>
  18. </a>
  19. By <a href="vimeo.com/beautifullifestudios"; id="clr">Beautiful Life Studios</a>
  20. .</p>
  21. </div>
  22.  
  23. <script>
  24. function openModal() {
  25. document.getElementById('myModal').style.display = "block";
  26. }
  27.  
  28. function closeModal() {
  29. document.getElementById('myModal').style.display = "none";
  30. }
  31.  
  32. var slideIndex = 1;
  33. showSlides(slideIndex);
  34.  
  35. function plusSlides(n) {
  36. showSlides(slideIndex += n);
  37. }
  38.  
  39. function currentSlide(n) {
  40. showSlides(slideIndex = n);
  41. }
  42.  
  43. function showSlides(n) {
  44. var i;
  45. var slides = document.getElementsByClassName("mySlides");
  46. var dots = document.getElementsByClassName("demo");
  47. var captionText = document.getElementById("caption");
  48. if (n > slides.length) {slideIndex = 1}
  49. if (n < 1) {slideIndex = slides.length}
  50. for (i = 0; i < slides.length; i++) {
  51. slides[i].style.display = "none";
  52. }
  53.  
  54. for (i = 0; i < dots.length; i++) {
  55. dots[i].className = dots[i].className.replace(" active", "");
  56. }
  57. slides[slideIndex-1].style.display = "block";
  58. dots[slideIndex-1].className += " active";
  59. captionText.innerHTML = dots[slideIndex-1].alt;
  60. }
  61.  
  62. </script>
  63.  
  64. <iframe id="my_vide" class="embed-responsive-item" src="link_to_some_video"allowfullscreen></iframe>
  65.  
  66. function closeModal() {
  67. var video = document.getElementById("vid");
  68. document.getElementById('myModal').style.display = "none";
  69. document.getElementById('vid').src = '';
  70. }
  71.  
  72. // Video src
  73. var video_src = [
  74. "https://www.youtube.com/embed/sdUUx5FdySs?autoplay=1",
  75. "https://www.youtube.com/embed/YE7VzlLtp-4?autoplay=1"
  76. ];
  77.  
  78. var current_video = "";
  79.  
  80. var frame = document.getElementById('vid');
  81.  
  82. // slides
  83. var slideIndex = 1;
  84. showSlides(slideIndex);
  85.  
  86. function plusSlides(n) {
  87. showSlides(slideIndex += n);
  88. }
  89.  
  90. function currentSlide(n) {
  91. showSlides(slideIndex = n);
  92. current_video = video_src[n-1];
  93. frame.src = current_video;
  94.  
  95. }
  96.  
  97. function closeModal() {
  98. document.getElementById('myModal').style.display = "none";
  99.  
  100. document.getElementById("youVideoId").pause();
  101. }
Add Comment
Please, Sign In to add comment