PageSourceSearch

https://championscreed.ca/wp-content/themes/hello-elementor/assets/js/brazilian-jiu-jitsu-for-kids.js?ver=1.0

js championscreed.ca collected 2026-10-02 08:37:01 UTC 5,565 bytes, 194 lines download raw bytes

1jQuery(document).ready(function ($) {
2 
3
4      const navLinks = document.querySelectorAll('.site_nav a[href^="#"]');
5      const header = document.querySelector('.site_header');
6
7      navLinks.forEach(link => {
8        link.addEventListener('click', function(e) {
9          e.preventDefault();
10
11          const targetId = this.getAttribute('href');
12          const targetSection = document.querySelector(targetId);
13
14          if (!targetSection) return;
15
16          // remove active class
17          navLinks.forEach(l => l.classList.remove('active'));
18
19          // add active to clicked
20          this.classList.add('active');
21
22          const headerHeight = header.offsetHeight;
23
24          const offsetTop =
25            targetSection.getBoundingClientRect().top +
26            window.pageYOffset -
27            headerHeight;
28
29          window.scrollTo({
30            top: offsetTop,
31            behavior: 'smooth'
32          });
33        });
34      });
35
36      /*-----------------------------------------------------------------
37      1. >>> Header on on scroll down Js
38      ----------------------------------------------------------------*/
39      $(window).scroll(function () {
40          if ($(window).scrollTop() >= 10) {
41              $('.site_header').addClass('stick');
42          } else {
43              $('.site_header').removeClass('stick');
44          }
45      }).scroll();
46
47      /*--------------------------------------------------------------
48      >>> Mobile Menu
49      ----------------------------------------------------------------*/
50      $('.mobile_menu_button').on('click', function(){
51            $('.site_nav').addClass('menu_open');
52        });
53
54        $('.mobile_menu_close').on('click', function(){
55            $('.site_nav').removeClass('menu_open');
56        });
57
58        // close menu when clicking nav link
59        $('.site_nav a[href^="#"]').on('click', function(){
60            $('.site_nav').removeClass('menu_open');
61      });
62
63 
64 
65    // ============================================
66      // FAQ Accordion Functionality
67      // ============================================
68      const faqItems = document.querySelectorAll(".faq-item");
69
70
71      // Open First FAQ Item By Default
72      if (faqItems.length > 0) {
73        const firstItem = faqItems[0];
74        firstItem.classList.add("active");
75
76        const firstAnswer = firstItem.querySelector(".faq-answer");
77        firstAnswer.style.maxHeight = firstAnswer.scrollHeight + "px";
78      }
79
80
81      // Add Click Event To Each FAQ Question
82      faqItems.forEach(item => {
83
84        const question = item.querySelector("h4");
85
86        question.addEventListener("click", function () {
87
88          const isActive = item.classList.contains("active");
89
90          // Close All FAQ Items
91          faqItems.forEach(el => {
92            el.classList.remove("active");
93            el.querySelector(".faq-answer").style.maxHeight = null;
94          });
95
96          // Open Clicked Item (If Not Already Active)
97          if (!isActive) {
98            item.classList.add("active");
99            const answer = item.querySelector(".faq-answer");
100            answer.style.maxHeight = answer.scrollHeight + "px";
101          }
102
103        });
104
105      });
106
107
108
109      /*--------------------------------------------------------------
110      >>> SVG
111      ----------------------------------------------------------------*/
112      gsap.registerPlugin(ScrollTrigger);
113
114      const path = document.querySelector("#anidraw_svg_draw");
115
116      if (path) {
117
118          const length = path.getTotalLength();
119
120          // hide path initially
121          path.style.strokeDasharray = length;
122          path.style.strokeDashoffset = length;
123
124          gsap.to(path, {
125              strokeDashoffset: 0,
126              duration: 2,
127              ease: "power2.out",
128              scrollTrigger: {
129                  trigger: ".image_content_block",
130                  start: "bottom 120%",
131                  toggleActions: "play none none none",
132                  once: true,
133                  //markers: true
134              }
135          });
136
137      }
138      /*--------------------------------------------------------------
139      >>> Button
140      ----------------------------------------------------------------*/
141      $('.com_button[href^="#"],.image_content_button[href^="#"]').on('click', function(e) {
142
143          e.preventDefault();
144
145          var target = $(this).attr('href');
146          var headerHeight = $('header.site_header').outerHeight(); // get header height
147
148          if($(target).length){
149
150              $('html, body').animate({
151                  scrollTop: $(target).offset().top - headerHeight
152              }, 800);
153
154          }
155
156       });
157
158       $('.calender_slider').slick({
159        fade: true,
160        cssEase: 'linear',
161        dots: false,
162        infinite: false,
163        speed: 300,
164        slidesToShow: 1,
165        adaptiveHeight: true,
166    
167        prevArrow: '<button class="slick-prev"><i class="ri-arrow-left-s-line"></i></button>',
168        nextArrow: '<button class="slick-next"><i class="ri-arrow-right-s-line"></i></button>'
169    });
170
171
172          /*--------------------------------------------------------------
173      >>> Aos
174      ----------------------------------------------------------------*/
175
176      AOS.init({
177        //offset: 100,
178        once: true,
179        easing: 'ease',
180        duration: 900,
181        debounceDelay: 10,
182        throttleDelay: 99,
183        delay: 0,
184        mirror: false,
185        anchorPlacement: 'top-bottom',
186        disable: window.innerWidth < 1199
187    });
188          
189
190
191
192
193});
194

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.