diff --git a/index.html b/index.html
index 97d315b..8383346 100644
--- a/index.html
+++ b/index.html
@@ -43,10 +43,10 @@
-
Folklore literature
-
Islamic Mysticism
-
Contemporary poets
-
Contemporary musicians
+
Folklore literature
+
Islamic Mysticism
+
Contemporary poets
+
Contemporary musicians
@@ -205,6 +205,22 @@ $(document).ready(function() {
// }
+// function popup_bg(start,end){
+// var myIcon = document.querySelector(".audioBG");
+// var box = document.getElementById("audioBG");
+// box.currentTime = start;
+// myIcon.className = "audioBG fa fa-pause";
+// box.play();
+// console.log(box.currentTime);
+// setInterval(function(){
+// if(box.currentTime>end){
+// myIcon.className = "audioBG fa fa-play";
+// box.pause();
+// console.log(box.currentTime);
+// }
+// },1000);
+// }
+
function popup_bg(start,end){
var myIcon = document.querySelector(".audioBG");
var box = document.getElementById("audioBG");
@@ -212,14 +228,11 @@ function popup_bg(start,end){
myIcon.className = "audioBG fa fa-pause";
box.play();
console.log(box.currentTime);
- setInterval(function(){
- if(box.currentTime>end){
- myIcon.className = "audioBG fa fa-play";
- box.pause();
- }
- },1000);
+ setTimeout(() => { myIcon.className = "audioBG fa fa-play";box.pause(); console.log(box.currentTime);}, end);
}
+
+