标题点击只打开一个面板
This commit is contained in:
@@ -182,6 +182,7 @@ function toggleSection(id) {
|
||||
document.getElementById(id).classList.toggle('collapsed');
|
||||
}
|
||||
function openSection(id) {
|
||||
document.querySelectorAll('.section').forEach(function(s) { s.classList.add('collapsed'); });
|
||||
var el = document.getElementById(id);
|
||||
el.classList.remove('collapsed');
|
||||
el.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
||||
|
||||
@@ -182,6 +182,7 @@ function toggleSection(id) {
|
||||
document.getElementById(id).classList.toggle('collapsed');
|
||||
}
|
||||
function openSection(id) {
|
||||
document.querySelectorAll('.section').forEach(function(s) { s.classList.add('collapsed'); });
|
||||
var el = document.getElementById(id);
|
||||
el.classList.remove('collapsed');
|
||||
el.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
||||
|
||||
Reference in New Issue
Block a user