Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
erhuodaosi authored Aug 5, 2024
1 parent c472189 commit 39d6153
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const doorLeft = document.querySelector('.door-left')
const doorRight = document.querySelector('.door-right')
const countdown = getElementById('countdown')
const count = getElementById('count')
let typeAgain = true

// 图片数组
const images = [
Expand Down Expand Up @@ -135,7 +136,10 @@ function showTab(tabId) {
button.classList.toggle('active', button.getAttribute('onclick').includes(tabId))
})

if (tabId == 'tab3') startTyping()
if (tabId == 'tab3' && typeAgain) {
startTyping()
typeAgain = false
}
}

// 显示文章
Expand Down

0 comments on commit 39d6153

Please sign in to comment.