1
0
Fork 0

Enlarge text difficult level for one second (make it work using vanilla JavaScript)

Bug-561
Lan Hui 2023-07-17 16:28:08 +08:00
parent 78d9a66e88
commit 43419ab4b6
1 changed files with 3 additions and 2 deletions

View File

@ -204,8 +204,9 @@
$('#source').html(today_article['source']);
$('#question').html(today_article["question"]);
$('#answer').html(today_article["answer"]);
$('#text_level').classList.add('display-5'); // enlarge text difficult level for one second
setTimeOut(() => {$('#text_level').classList.remove('display-5');}, 1000);
document.querySelector('#text_level').classList.add('display-5'); // enlarge text difficult level for one second
setTimeout(() => document.querySelector('#text_level').classList.remove('display-5'), 800);
}
<!-- 检查是否存在上一篇或下一篇,不存在则对应按钮隐藏-->
function check_pre(visited_articles){