Browse Source

three clicks one button

master
nglk 4 years ago
parent
commit
7cfeabd42a
  1. 11
      templates/hello.html

11
templates/hello.html

@ -8,7 +8,7 @@
<div class="row"> <div class="row">
<div class="col-md-1 col-sm-4"> <div class="col-md-1 col-sm-4">
<svg id="first_circle" onclick="scrolldiv()"> <svg id="first_circle" onclick="scrolldiv();play();">
<circle cx="50" cy="50" r="2rem" stroke="green" stroke-width="4" fill="yellow" /> <circle cx="50" cy="50" r="2rem" stroke="green" stroke-width="4" fill="yellow" />
<text id="angela" x="50" y="50" text-anchor="middle">hello </text> <text id="angela" x="50" y="50" text-anchor="middle">hello </text>
</svg> </svg>
@ -25,7 +25,7 @@
</div> </div>
</div> </div>
<div class="col-md-9"> <div class="col-md-9">
<audio controls> <audio id='audio-1' controls>
<source src="../static/audio/HNI_Soundinstall_3tracks_together1.mp3" type="audio/mpeg"> <source src="../static/audio/HNI_Soundinstall_3tracks_together1.mp3" type="audio/mpeg">
Your browser does not support the audio tag. Your browser does not support the audio tag.
</audio> </audio>
@ -90,6 +90,13 @@
var elem = document.getElementById("ele"); var elem = document.getElementById("ele");
elem.scrollIntoView(); elem.scrollIntoView();
} }
function play() {
var audio = document.getElementById("audio-1");
audio.currentTime=12;
audio.play();
}
// document.getElementById("audio-1").loop = true;
</script> </script>

Loading…
Cancel
Save