three clicks one button

This commit is contained in:
nglk 2020-09-29 15:38:32 +02:00
parent f1f5ea4c3c
commit 7cfeabd42a

View File

@ -8,7 +8,7 @@
<div class="row">
<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" />
<text id="angela" x="50" y="50" text-anchor="middle">hello </text>
</svg>
@ -25,7 +25,7 @@
</div>
</div>
<div class="col-md-9">
<audio controls>
<audio id='audio-1' controls>
<source src="../static/audio/HNI_Soundinstall_3tracks_together1.mp3" type="audio/mpeg">
Your browser does not support the audio tag.
</audio>
@ -90,6 +90,13 @@
var elem = document.getElementById("ele");
elem.scrollIntoView();
}
function play() {
var audio = document.getElementById("audio-1");
audio.currentTime=12;
audio.play();
}
// document.getElementById("audio-1").loop = true;
</script>