PageSourceSearch

https://mastermindesolutions.com/skin/bootstrap/js/home.js

js mastermindesolutions.com collected 2026-10-02 00:52:28 UTC 5,802 bytes, 204 lines download raw bytes

1
2  document.querySelectorAll('.about-tab').forEach(tab => {
3    tab.addEventListener('click', function () {
4      document.querySelectorAll('.about-tab').forEach(t => t.classList.remove('active'));
5      this.classList.add('active');
6
7      const target = this.getAttribute('data-target');
8      document.querySelectorAll('.tab-section').forEach(section => {
9        section.classList.remove('show');
10        if (section.id === target) section.classList.add('show');
11      });
12    });
13  });
14
15  document.addEventListener('DOMContentLoaded', function () {
16    const faqItems = document.querySelectorAll('#faq-1 .faq-1-item');
17
18    faqItems.forEach(item => {
19      const btn = item.querySelector('.faq-1-question');
20      btn.addEventListener('click', () => {
21        // 关闭其他已展开项(如需“手风琴式”,保留此逻辑)
22        faqItems.forEach(i => {
23          if (i !== item) i.classList.remove('active');
24        });
25
26        // 切换当前项
27        item.classList.toggle('active');
28      });
29    });
30  });
31  
32  document.querySelectorAll('#faq-2 .faq-2-question').forEach(item => {
33  item.addEventListener('click', () => {
34    const faqItem = item.parentElement;
35    faqItem.classList.toggle('active');
36    const answer = faqItem.querySelector('.faq-2-answer');
37    answer.style.display = faqItem.classList.contains('active') ? 'block' : 'none';
38  });
39});
40
41document.querySelectorAll('#faq-3 .faq-3-questions button').forEach(btn => {
42  btn.addEventListener('click', () => {
43    // 切换按钮样式
44    document.querySelectorAll('#faq-3 .faq-3-questions button').forEach(b => b.classList.remove('active'));
45    btn.classList.add('active');
46
47    // 显示对应回答
48    const target = btn.getAttribute('data-answer');
49    document.querySelectorAll('#faq-3 .faq-3-answer').forEach(ans => {
50      ans.classList.remove('active');
51    });
52    document.getElementById(target).classList.add('active');
53  });
54});
55
56
57  document.querySelectorAll('#faq-9 .faq9-flip-card').forEach(function (card) {
58    card.addEventListener('click', function () {
59      this.classList.toggle('clicked');
60    });
61  });
62  
63  document.querySelectorAll('#departments-11 .tab-btn').forEach(btn => {
64  btn.addEventListener('click', () => {
65    // 切换按钮样式
66    document.querySelectorAll('#departments-11 .tab-btn').forEach(b => b.classList.remove('active'));
67    btn.classList.add('active');
68
69    // 切换内容面板
70    const target = btn.getAttribute('data-tab');
71    document.querySelectorAll('#departments-11 .tab-panel').forEach(panel => {
72      panel.classList.remove('active');
73    });
74    document.getElementById(target).classList.add('active');
75  });
76});
77
78  const swiper = new Swiper('.updateSwiper', {
79    slidesPerView: 'auto',
80    spaceBetween: 20,
81    grabCursor: true,
82    freeMode: true,
83    breakpoints: {
84      768: {
85        slidesPerView: 2.5
86      },
87      1024: {
88        slidesPerView: 3
89      }
90    }
91  });
92
93
94  window.addEventListener('DOMContentLoaded', () => {
95    const header = document.querySelector('#header-3');
96    const main = document.querySelector('.main-content');
97    if (header && main) {
98      main.style.paddingTop = header.offsetHeight + 'px';
99    }
100  });
101
102  function toggleMobileMenu() {
103    const menu = document.getElementById('mobileMenu11');
104    menu.classList.toggle('show');
105  }
106 
107   function toggleMobileMenu12() {
108    const menu = document.getElementById('mobileMenu12');
109    menu.classList.toggle('show');
110  }
111    new Swiper('.news2-swiper', {
112    slidesPerView: 1.1,
113    spaceBetween: 16,
114    grabCursor: true,
115    breakpoints: {
116      768: {
117        slidesPerView: 2,
118        spaceBetween: 24
119      }
120    }
121  });
122    const news13Swiper = new Swiper('.news13-swiper', {
123    slidesPerView: 'auto',
124    spaceBetween: 16,
125    freeMode: true,
126    grabCursor: true
127  });
128 
129    document.addEventListener("DOMContentLoaded", function () {
130    const ctx = document.getElementById("stats13-chart").getContext("2d");
131    new Chart(ctx, {
132      type: "line",
133      data: {
134        labels: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
135        datasets: [{
136          label: "活跃用户",
137          data: [54000, 58000, 60000, 63000, 67000, 66000, 67200],
138          borderColor: "#007bff",
139          backgroundColor: "rgba(0, 123, 255, 0.1)",
140          fill: true,
141          tension: 0.4,
142        }],
143      },
144      options: {
145        responsive: true,
146        plugins: {
147          legend: {
148            display: false
149          }
150        },
151        scales: {
152          y: {
153            ticks: {
154              color: "#333",
155            }
156          },
157          x: {
158            ticks: {
159              color: "#333",
160            }
161          }
162        }
163      },
164    });
165  });
166  
167    new Swiper(".appIntroSwiper-15", {
168    slidesPerView: 1.1,
169    spaceBetween: 16,
170    pagination: {
171      el: ".swiper-pagination",
172      clickable: true,
173    },
174    breakpoints: {
175      768: {
176        slidesPerView: 3
177      }
178    }
179  });
180  
181  document.addEventListener("DOMContentLoaded", function () {
182    const toast = document.getElementById("copy-toast");
183
184    document.querySelectorAll('[data-copy]').forEach(function (el) {
185      el.addEventListener("click", function () {
186        const link = el.getAttribute("data-copy");
187        navigator.clipboard.writeText(link)
188          .then(() => {
189            // 显示提示
190            toast.classList.remove("d-none");
191            toast.classList.add("show");
192            // 2秒后自动隐藏
193            setTimeout(() => {
194              toast.classList.remove("show");
195              setTimeout(() => toast.classList.add("d-none"), 400);
196            }, 2000);
197          })
198          .catch(() => {
199            alert("复制失败,请手动复制");
200          });
201      });
202    });
203  });
204  

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.