diff --git a/js/custom.js b/js/custom.js index aa4d820..39766dc 100644 --- a/js/custom.js +++ b/js/custom.js @@ -21,7 +21,7 @@ var speed = 1; var upTimer = null,downTimer = null,leftTimer = null,rightTimer = null; var suiDanTimer = null; var startIndex = 0; -// 集体舞 +// 集体舞ji function allDancing(dangcing){ if(dangcing!=''){ // clearInterval(upTimer); @@ -204,9 +204,16 @@ $(function(){ }) },4000) // 自动切歌 - setInterval(()=>{ + var audio=document.getElementById('music'); + if(audio){ + audio.loop = false; + audio.addEventListener('ended', function () { changeMusic() - },1000 * 60 * 2) + }, false); + } + // setInterval(()=>{ + // changeMusic() + // },1000 * 60 * 2) // setTimeout(()=>{ // console.log('开始集体舞'); // allDancing();