Browse Source

stop videos

master
alicestrt 3 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>
function closevideo (){
$("#showvideo").hide()
$('iframe').each(function(index) {
$(this).attr('src', $(this).attr('src'));
return false;
});
}
$("#about").click(function(){
$("#showabout").fadeIn()
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) {
// popup video
// this is for next the this.parent... ;var video=document.getElementById('#video" + i.id + "');video.pause();
$('#showvideo').hide();
console.log('vid')
if (i.url) {
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.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()
$("#thesisX").fadeIn()
$("#bio" + name).fadeIn()
var dada = document.getElementById("text" + name);
dada.className += " active";
dada.scrollIntoView();
// var audio1 = document.getElementById("audioBG");
// audio1.currentTime = time;
// audio1.play();
// var dada = document.getElementById("text" + name);
// dada.className += " active";
// dada.scrollIntoView();
};

Loading…
Cancel
Save