PageSourceSearch

https://instaphysique.com/wp-content/themes/MTT_2024/assets/js/global.js?ver=1707769216

js instaphysique.com collected 2026-10-04 16:56:51 UTC 6,625 bytes, 240 lines download raw bytes

1/*!
2 * Immediately Invoked Function Expression Boilerplate
3 * (c) 2019 Chris Ferdinandi, MIT License, https://gomakethings.com
4 */
5;(function () {
6
7	'use strict';
8
9	// Element variables
10	const menuToggle = document.querySelector('.menu-toggle');
11	const navMenu = document.querySelector('.nav-menu[role="navigation"]');
12
13	const elementExists = function(element) {
14		if ( typeof(element) != 'undefined' && element != null ) {
15			return true;
16		}
17		return false;
18	}
19
20	// Event functions
21	const toggleMenu = function(event) {
22		if ( !event.target.closest('.menu-toggle') ) return;
23		if ( elementExists(navMenu) ) {
24			navMenu.classList.toggle('active');
25		}
26		menuToggle.classList.toggle('active');
27	}
28
29	const toggleSubMenu = function(event) {
30		if ( !event.target.closest('.submenu-expand') ) return;
31		event.target.closest('.submenu-expand').classList.toggle('expanded');
32		event.preventDefault();
33	}
34
35	// Add functions to click event listener
36	document.addEventListener('click', function(event) {
37		toggleMenu(event);
38		toggleSubMenu(event);
39	});
40
41
42//   jQuery('.recipe-index .theiaStickySidebar').theiaStickySidebar({
43//     additionalMarginTop: 90,
44//   });
45
46jQuery('.info-slider').slick({
47autoplay: false,
48arrows: true,
49dots: false,
50infinite: true,
51slidesToShow: 1,
52swipeToSlide: true,
53centerMode: true,
54centerPadding: '20%',
55variableWidth: false,
56slidesToScroll: 1,
57prevArrow:"<button type='button' class='slick-prev pull-left'><img src='../wp-content/themes/MTT_2024/assets/icons/utility/left.png' class='left-arrow' alt='left arrow'></button>",
58nextArrow:"<button type='button' class='slick-next pull-right'><img src='../wp-content/themes/MTT_2024/assets/icons/utility/right.png' class='right-arrow' alt='right arrow'></button>",
59 responsive: [
60{
61  breakpoint: 550,
62  settings: {
63  slidesToShow: 1,
64  centerMode: true,
65  centerPadding: '0%',
66}
67},
68  ]
69});
70
71jQuery('.shop-highlight ul').slick({
72  autoplay: false,
73  arrows: true,
74  dots: false,
75  infinite: true,
76  slidesToShow: 5,
77  swipeToSlide: true,
78  slidesToScroll: 1,
79  prevArrow:"<button type='button' class='slick-prev pull-left'><img src='https://instaphysique.com/wp-content/uploads/2023/09/[email protected]' class='left-arrow' alt='left arrow'></button>",
80  nextArrow:"<button type='button' class='slick-next pull-right'><img src='https://instaphysique.com/wp-content/uploads/2023/09/[email protected]' class='right-arrow' alt='right arrow'></button>",
81  responsive: [
82{
83  breakpoint: 1050,
84  settings: {
85  slidesToShow: 3,
86}
87},
88{
89  breakpoint: 505,
90  settings: {
91  slidesToShow: 2,
92}
93},
94  ]
95});
96
97jQuery('.inner-tests ul').slick({
98  autoplay: true,
99  arrows:false,
100  dots: true,
101  infinite: true,
102  slidesToShow: 1,
103  swipeToSlide: true,
104  slidesToScroll: 1,
105});
106
107jQuery('.ticker-tape ul').slick({
108   infinite: true,
109  slidesToScroll: 1,
110  autoplay: true,
111  autoplaySpeed: 0,
112  speed: 10000,
113  variableWidth:true,
114  cssEase: "linear"
115});
116jQuery('.clients ul').slick({
117  autoplay: false,
118  arrows: true,
119  dots: false,
120  infinite: true,
121  slidesToShow: 5,
122  swipeToSlide: true,
123  slidesToScroll: 1,
124  prevArrow:"<button type='button' class='slick-prev pull-left'><img src='https://instaphysique.com/wp-content/uploads/2023/09/[email protected]' class='left-arrow' alt='left arrow'></button>",
125  nextArrow:"<button type='button' class='slick-next pull-right'><img src='https://instaphysique.com/wp-content/uploads/2023/09/[email protected]' class='right-arrow' alt='right arrow'></button>",
126  responsive: [
127{
128  breakpoint: 1050,
129  settings: {
130  slidesToShow: 3,
131}
132},
133  ]
134});
135jQuery(document).ready(function($){ 
136  
137 document.addEventListener("DOMContentLoaded", function() {
138     var video = document.getElementById("myVideo");
139     // Play the video after a user click
140     document.addEventListener("click", function() {
141         video.play();
142     });
143 });
144  
145  // $('.approach-item-drop-1').addClass('active');
146  $('.sf-field-taxonomy-faq_cat ul').addClass('sliding-border-list');
147 $('.sliding-border-list li').append('<div class="sliding-border-top"></div><div class="sliding-border-bottom"></div>');
148
149    $(".approach-item").mouseenter(function() {
150      var currentApproachItem = $(this).data('item');
151      
152      // Close all items
153      $('.approach-item-drop').removeClass('active');
154      
155      // Open the hovered item
156      $('.approach-item-drop-' + currentApproachItem).addClass('active');
157    });
158
159    $( ".mobile-toggle-button" ).click(function() {
160      $('.mobile-toggle-button').toggleClass('active');
161      $('.mobile-toggle').toggleClass('active');
162  });
163  $( ".mobile-toggle .menu-item-has-children > a" ).click(function(event) {
164    event.preventDefault();
165      $(this).parent().toggleClass('active');
166  });
167	
168	  $( ".ctav2.perks ul li em" ).click(function(event) {
169    event.preventDefault();
170      $(this).parent().toggleClass('active');
171  });
172  
173  $(document).ready(function(){
174  var $temp = $("<input>");
175  var $url = $(location).attr('href');
176  $('#copy').click(function() {
177  $("body").append($temp);
178  $temp.val($url).select();
179  document.execCommand("copy");
180  $temp.remove();
181  $("p.copied").text("URL copied!");
182  });
183  });
184  
185  $(document).ready(function(){
186  var $temp = $("<input>");
187  var $url = $(location).attr('href');
188  $('#copy2').click(function() {
189  $("body").append($temp);
190  $temp.val($url).select();
191  document.execCommand("copy");
192  $temp.remove();
193  $("p.copied2").text("URL copied!");
194  });
195  });
196  
197});
198document.addEventListener("DOMContentLoaded", function() {
199  var questions = document.querySelectorAll('.dd-question');
200
201  questions.forEach(function(question, index) {
202    question.addEventListener('click', function() {
203      var answer = this.nextElementSibling;
204
205      // Close all other dd-answers and remove 'open' class from questions
206      var allAnswers = document.querySelectorAll('.dd-answer');
207      var allQuestions = document.querySelectorAll('.dd-question');
208      
209      allAnswers.forEach(function(item) {
210        if (item !== answer) {
211          item.classList.remove('open');
212        }
213      });
214
215      allQuestions.forEach(function(q) {
216        if (q !== question) {
217          q.classList.remove('open');
218        }
219      });
220
221      // Toggle the current dd-answer and add 'open' class to the question
222      if (answer.classList.contains('open')) {
223        answer.classList.remove('open');
224        question.classList.remove('open');
225      } else {
226        answer.classList.add('open');
227        question.classList.add('open');
228      }
229    });
230
231    // Simulate a click on the first question to make it open by default
232    if (index === 0) {
233      question.click();
234    }
235  });
236});
237
238
239
240})();

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.