updated 添加新模块介绍

This commit is contained in:
mumuy
2024-09-21 09:36:47 +08:00
parent 227f44dced
commit fcd00542c6
9 changed files with 179 additions and 1 deletions

View File

@@ -9,6 +9,29 @@
});
})();
// 特征选项卡
(function(){
let $mod_feature = document.querySelector('.mod-feature');
let $nav = $mod_feature.querySelectorAll('.nav li');
let $panels = $mod_feature.querySelectorAll('.panels .panel');
let togglePanel = function(index = 0){
$nav.forEach(function($li){
$li.classList.remove('active');
});
$nav[index].classList.add('active');
$panels.forEach(function($panel){
$panel.classList.remove('active');
});
$panels[index].classList.add('active');
};
$nav.forEach(function($item,index){
$item.addEventListener('click',function(){
togglePanel(index);
});
});
togglePanel(0);
})();
// 底部滚动
(function(){
let $gotop = document.querySelector('.mod-fixedbar .gotop');