Browse Source

stop videos

master
alicestrt 4 years ago
parent
commit
b39e37ea83
  1. 12
      index.html
  2. 14
      static/js/d3_map.js

12
index.html

@ -187,6 +187,18 @@ includeHTML();
</script> </script>
<script> <script>
function closevideo (){
$("#showvideo").hide()
$('iframe').each(function(index) {
$(this).attr('src', $(this).attr('src'));
return false;
});
}
$("#about").click(function(){ $("#about").click(function(){
$("#showabout").fadeIn() $("#showabout").fadeIn()
console.log("around") console.log("around")

14
static/js/d3_map.js

@ -66,10 +66,10 @@ d3.json("/static/js/group1.json", function(error, json) {
.on("click", function(i) { .on("click", function(i) {
// popup video // popup video
// this is for next the this.parent... ;var video=document.getElementById('#video" + i.id + "');video.pause(); // this is for next the this.parent... ;var video=document.getElementById('#video" + i.id + "');video.pause();
$('#showvideo').hide(); console.log('vid')
if (i.url) { if (i.url) {
divVideo.transition().duration(100); divVideo.transition().duration(100);
divVideo.html("<div id='showvideo'><span onclick=this.parentElement.style.display='none' class='topleft'> &nbsp; &times&nbsp;</span><iframe id='video" + i.id + "' width='300' height='150' src='" + i.url + "' frameborder='0' allow='accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture' allowfullscreen></iframe></div>"); divVideo.html("<div id='showvideo'><span onclick=closevideo() class='topleft'> &nbsp; &times&nbsp;</span><iframe id='video" + i.id + "' width='300' height='150' src='" + i.url + "' frameborder='0' allow='accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture' allowfullscreen></iframe></div>");
}; };
divBio.transition().duration(100); divBio.transition().duration(100);
divBio.html("<div id='showbio'><span onclick=this.parentElement.style.display='none' class='topleft'> &nbsp; &times&nbsp;</span><div id='bio" + i.id + "'>" + i.bio + "</div>"); divBio.html("<div id='showbio'><span onclick=this.parentElement.style.display='none' class='topleft'> &nbsp; &times&nbsp;</span><div id='bio" + i.id + "'>" + i.bio + "</div>");
@ -160,12 +160,10 @@ d3.json("/static/js/group1.json", function(error, json) {
$("#thesis").fadeIn() $("#thesis").fadeIn()
$("#thesisX").fadeIn() $("#thesisX").fadeIn()
$("#bio" + name).fadeIn() $("#bio" + name).fadeIn()
var dada = document.getElementById("text" + name); // var dada = document.getElementById("text" + name);
dada.className += " active"; // dada.className += " active";
dada.scrollIntoView(); // dada.scrollIntoView();
// var audio1 = document.getElementById("audioBG");
// audio1.currentTime = time;
// audio1.play();
}; };

Loading…
Cancel
Save