微件:GF立绘切换
更多操作
<script> (function() { var containers = document.querySelectorAll('.infotemplatebox'); containers.forEach(function(container) { var tabs = container.querySelectorAll('.gf-tab'); var slides = container.querySelectorAll('.gf-slide'); if (tabs.length === 0 || slides.length === 0) return; tabs.forEach(function(tab) { tab.addEventListener('click', function() { var index = parseInt(this.getAttribute('data-index')); tabs.forEach(function(t) { t.classList.remove('active'); }); slides.forEach(function(s) { s.classList.remove('active'); }); this.classList.add('active'); if (slides[index]) { slides[index].classList.add('active'); } }); }); }); })(); </script>