PageSourceSearch

https://www.sa-hb.com/wp-content/themes/sahb/js/script.js

js sa-hb.com collected 2026-10-02 21:05:10 UTC 4,481 bytes, 194 lines download raw bytes

1if (document.getElementById("btnnav")) {
2  document.getElementById("btnnav").addEventListener("click", (e) => {
3    document.getElementById("btnnav").classList.toggle("active");
4    document.getElementById("navigation").classList.toggle("open");
5    e.stopPropagation();
6  });
7  window.addEventListener("click", (e) => {
8    if (!e.target.matches("#navigation")) {
9      document.getElementById("btnnav").classList.remove("active");
10      document.getElementById("navigation").classList.remove("open");
11    }
12  });
13  document.getElementById("navigation").addEventListener("click", (e) => {
14    e.stopPropagation();
15  });
16}
17$(document).on("click", ".js-videoPoster", function (ev) {
18  ev.preventDefault();
19  var $poster = $(this);
20  var $wrapper = $poster.closest(".js-videoWrapper");
21  videoPlay($wrapper);
22});
23function videoPlay($wrapper) {
24  var $iframe = $wrapper.find(".js-videoIframe");
25  var src = $iframe.data("src");
26  $wrapper.addClass("videoWrapperActive");
27  $iframe.attr("src", src);
28}
29function videoStop($wrapper) {
30  if (!$wrapper) {
31    var $wrapper = $(".js-videoWrapper");
32    var $iframe = $(".js-videoIframe");
33  } else {
34    var $iframe = $wrapper.find(".js-videoIframe");
35  }
36  $wrapper.removeClass("videoWrapperActive");
37  $iframe.attr("src", "");
38}
39if ($(".listCarrousel").length > 0) {
40  $(".listCarrousel").slick({
41    infinite: true,
42    slidesToShow: 3,
43    slidesToScroll: 1,
44    autoplay: false,
45    dots: false,
46    arrows: true,
47    responsive: [
48      {
49        breakpoint: 1025,
50        settings: {
51          centerMode: true,
52          slidesToShow: 2,
53          slidesToScroll: 1,
54          centerPadding: "60px",
55        },
56      },
57      {
58        breakpoint: 800,
59        settings: {
60          centerMode: true,
61          slidesToShow: 1,
62          slidesToScroll: 1,
63          centerPadding: "50px",
64        },
65      },
66      {
67        breakpoint: 320,
68        settings: {
69          centerMode: true,
70          slidesToShow: 1,
71          slidesToScroll: 1,
72          centerPadding: "20px",
73        },
74      },
75    ],
76  });
77}
78if ($(".listCarrousel2").length > 0) {
79  $(".listCarrousel2").slick({
80    infinite: true,
81    slidesToShow: 4,
82    slidesToScroll: 1,
83    autoplay: false,
84    dots: false,
85    arrows: true,
86    responsive: [
87      {
88        breakpoint: 1025,
89        settings: {
90          centerMode: true,
91          slidesToShow: 2,
92          slidesToScroll: 1,
93          centerPadding: "60px",
94        },
95      },
96      {
97        breakpoint: 800,
98        settings: {
99          centerMode: true,
100          slidesToShow: 1,
101          slidesToScroll: 1,
102          centerPadding: "50px",
103        },
104      },
105      {
106        breakpoint: 325,
107        settings: {
108          centerMode: true,
109          slidesToShow: 1,
110          slidesToScroll: 1,
111          centerPadding: "20px",
112        },
113      },
114    ],
115  });
116}
117if ($(".pagActus .listActus").length > 0) {
118  // var $grid = $(".listActus").isotope({
119    // itemSelector: ".listActus__item",
120    // layoutMode: "fitRows",
121  // });
122  // $(".cntFilters").on("click", "button", function () {
123    // var filterValue = $(this).attr("data-filter");
124    // $grid.isotope({ filter: filterValue });
125    // $(".cntFilters").find(".is-checked").removeClass("is-checked");
126    // $(this).addClass("is-checked");
127  // });
128  
129  
130  
131  jQuery(".sectAct.pagActus .cntFilters button").click(function(){
132   
133
134   var clickos = jQuery(this).attr("id");
135	 
136
137	jQuery('.listActus').find('.listActus__item').hide().filter(function () {
138
139		  var okclickos = true;
140		  if(clickos !== "tous"){
141			okclickos = jQuery(this).attr('data-category') === clickos;
142		  }
143
144		  return okclickos;
145		  
146	  }).fadeIn('slow');
147
148		});
149		
150
151
152
153$('.cntFilters button').click(function() {
154        $('.cntFilters__btn.is-checked').removeClass("is-checked");
155        $(this).addClass("is-checked");
156    });
157	
158	
159
160}
161
162if ($('[data-fancybox="gallery"]').length > 0) {
163  $('[data-fancybox="gallery"]').fancybox({
164      buttons: [
165          "close"
166      ]
167  });
168}
169
170
171
172if ($('.reorder').length > 0) {
173	$.fn.sortChildren = function() {
174							this
175							  .children()
176							  .sort((a,b) => $(a).data("order") - $(b).data("order") || -1)
177							  .appendTo(this);
178
179							return this;
180						}
181
182						$(".reorder").sortChildren();
183						
184}						
185						
186document.querySelector('.search-toggle').addEventListener('click', function(){
187
188    document
189        .querySelector('.header-search')
190        .classList.toggle('active');
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.