PageSourceSearch

https://www.parc-naturel-normandie-maine.fr/web/js/script.js

js parc-naturel-normandie-maine.fr collected 2026-10-02 04:30:48 UTC 8,003 bytes, 331 lines download raw bytes

1$( document ).ready(function() {
2
3	// MENU BURGER ANIMATION (CLICK)
4	/*
5	    const menuBurger = document.querySelector('#btnMenuResp');
6	    function addClassFunBurger() {
7	        this.classList.toggle("clickMenuBurger");
8	    }
9	    menuBurger.addEventListener('click', addClassFunBurger);
10	*/
11  
12	// MENU PAGE
13
14    $(".menu-page--item-1").bind("click",function(){
15    	$(".menu-page--item-1").not(this).removeClass("is-clicked");
16    	$(this).toggleClass("is-clicked");
17    	$('.menu-page-2-wrapper').not($(this).find('.menu-page-2-wrapper')).stop().slideUp();
18    	$(this).find('.menu-page-2-wrapper').stop().slideToggle();    
19    });
20
21    $(".show-aside").bind("click",function(){
22        $(this).toggleClass("is-active");  
23    	$(".show-col").removeClass("swiperight");  
24    	$(".show-col").toggleClass("is-showed");  
25    });  
26	
27    // MENU RESPONSIVE DEPLI
28
29    $("#menu-btn").bind("click",function(){
30    	$(this).toggleClass("resp");
31        $("#nav-header").toggleClass("resp");             
32    });
33
34    // LIGHTSLIDER
35
36    $(".close-btn").bind("click",function(){
37        $(".modal").removeClass("active");           
38    });
39
40    $(".round-action-header.nl").bind("click",function(){
41        $(".modal").toggleClass("active");           
42    });
43    
44    $('#slider-home-list').lightSlider({
45    	adaptiveHeight: true,
46        item:1,
47        slideMove:1,
48        slideMargin:0,
49        loop:true,
50        mode: 'fade',
51        pauseOnHover: true,
52        controls: false,
53        pager: true,
54        auto: false,
55        pause: 6000,
56        speed: 2000
57    });
58    var slider = $('#actualites-list.slider-js').lightSlider({
59        item:4,
60        slideMove:1,
61        slideMargin:30,
62        controls: false,
63        pager: false,
64        auto: false,
65        enableTouch: false,
66        enableDrag: false,
67        responsive : [
68	        {
69	            breakpoint:1500,
70	            settings: {
71	            	item:3,
72	            }
73	        },
74	        {
75	            breakpoint:1000,
76	            settings: {
77	            	item:2,
78	            }
79	        },
80	        {
81	            breakpoint:700,
82	            settings: {
83	            	item:1,
84	            }
85	        }
86        ]
87    });
88
89    $('#actualites .lSPrev').click(function(){
90        slider.goToPrevSlide(); 
91    });
92    $('#actualites .lSNext').click(function(){
93        slider.goToNextSlide(); 
94    });
95
96    $('#last-video').lightGallery(); 
97    
98    var heightAgenda = $('.agenda-list__item').height();
99    $('.agenda-list__item').css("height", heightAgenda);
100	$(window).on("load resize",function(e){
101		var heightAgenda = $('.agenda-list__item').height();
102    	$('.agenda-list__item').css("height", heightAgenda);
103	});
104
105  // Liste Financeurs
106  $(document).ready(function() {
107    $('#liste-financeurs').lightSlider({
108        item:8,
109        slideMargin:0,
110        controls: false,
111        pager: false,
112        auto: true,
113        loop: true,
114        responsive : [
115            {
116                breakpoint:1100,
117                settings: {
118                    item:6,
119                  }
120            },
121            {
122                breakpoint:900,
123                settings: {
124                    item:6,
125                  }
126            },
127            {
128                breakpoint:700,
129                settings: {
130                    item:4,
131                  }
132            },
133            {
134                breakpoint:500,
135                settings: {
136                    item:3,
137                  }
138            }
139        ]
140    });
141  });
142
143  var agendaSlider_etat = false;
144  $(window).on('load resize', function () {
145    if ($(window).width() <= 1500 && agendaSlider_etat == false) {
146      $('#agenda-list').css({
147        "display": "block",
148        "margin": "0 0 20px 0"
149      });
150      $('#agenda-list a').css({
151        "height": "auto",
152        "margin": "0"
153      });
154      $('#agenda .lSAction').css({
155        "display": "block",
156      });
157      var agendaSlider = $('#agenda-list').lightSlider({
158        item:4,
159        slideMargin:30,
160        controls: false,
161        pager: false,
162        responsive : [
163          {
164              breakpoint:1500,
165              settings: {
166                item:3,
167              }
168          },
169          {
170              breakpoint:1000,
171              settings: {
172                item:2,
173              }
174          },
175          {
176              breakpoint:700,
177              settings: {
178                item:1,
179              }
180          }
181        ]
182      });
183
184      $('#agenda .lSPrev').click(function(){
185        agendaSlider.goToPrevSlide();
186      });
187      $('#agenda .lSNext').click(function(){
188        agendaSlider.goToNextSlide();
189      });
190
191      agendaSlider_etat = true;
192    } else if ($(window).width() > 1500 && agendaSlider_etat == true) {
193      
194    }
195    
196  });
197
198	// Hide Header on on scroll down
199	var didScroll;
200	var lastScrollTop = 0;
201	var delta = 5;
202	var navbarHeight = $('header').outerHeight();
203
204	$(window).scroll(function(event){
205	    didScroll = true;
206	});
207
208	setInterval(function() {
209	    if (didScroll) {
210	        hasScrolled();
211	        didScroll = false;
212	    }
213	}, 250);
214
215	function hasScrolled() {
216	    var st = $(this).scrollTop();
217	    
218	    // Make sure they scroll more than delta
219	    if(Math.abs(lastScrollTop - st) <= delta)
220	        return;
221	    
222	    // If they scrolled down and are past the navbar, add class .nav-up.
223	    // This is necessary so you never see what is "behind" the navbar.
224	    if (st > lastScrollTop && st > navbarHeight){
225	        // Scroll Down
226	        $('header').removeClass('nav-down').addClass('nav-up');
227	    } else {
228	        // Scroll Up
229	        if(st + $(window).height() < $(document).height()) {
230	            $('header').removeClass('nav-up').addClass('nav-down');
231	        }
232	    }
233	    
234	    lastScrollTop = st;
235	}
236  
237    //extranet
238    $('#a-acces-extranet').on('click', function() {
239        $('#div-connexion-extranet').show("slide", { direction: "left" }, 500);
240    });
241    $('#btn-connexion-reset').on('click', function() {
242        $('#div-connexion-extranet').hide("slide", { direction: "right" }, 500);
243    });
244
245    if($('#div-connexion-message').html()!='') {
246        $('#div-connexion-extranet').show("slide", { direction: "left" }, 500);
247        $("#div-connexion-message").css('display', 'block');
248        $('html,body').animate({
249            scrollTop: $("#div-connexion-message").offset().top
250        }, '1');
251    }
252
253    // SETUP LE ZOOM IMAGE
254    $( ".zoomImage" ).each(function() {
255        let srcImage = $(this).attr("longdesc");
256        $(this).wrap( "<a class='open-zoomImage' href='"+srcImage+"'></a>" );
257    });
258    $('#colonne-contenu').lightGallery({
259        selector: '.open-zoomImage'
260    });
261    
262    //img avec copy right
263    $('img[data-copyright]').each(function() {
264      var divc = $('<span class="img_copyright_title">&copy; ' + $(this).data('copyright') + '</span>');
265      /*
266      var theClass = $(this).attr("class").match(/align[\w-]*\b/);
267      $(this).wrap("<div class='img-wrapper "+theClass[0]+"'></div>");
268      */
269      $(this).wrap("<div class='img-wrapper'></div>");
270      $(this).addClass('img_copyright');
271      $(this).after(divc);
272    });
273    
274  //calendrier jquery.ui
275
276  $( ".dater" ).datetimepicker(
277
278      {
279
280      lang:'fr',
281
282      timepicker:false,
283
284      format:'d/m/Y',
285
286      formatDate:'d/m/Y',
287
288      dayOfWeekStart: 1,
289
290      scrollMonth : false,
291      
292      scrollInput : false
293
294
295      }
296
297  );   
298
299   
300  $( ".dater_timer" ).datetimepicker(
301
302      {
303
304      lang:'fr',
305
306      timepicker:true,
307
308      format:'d/m/Y H:i',
309
310      formatDate:'d/m/Y',
311
312      dayOfWeekStart: 1
313
314      }
315
316  );     
317  
318
319}); // FIN READY
320
321//get_url_site - test si la fonction est déjà déclarée
322if (typeof get_url_site !== "function") {
323  //recuperation de l'url du site
324  function get_url_site() {
325  	var pathname = window.location.pathname; 
326    var url = window.location.href;
327    var a = url.indexOf(pathname);
328    var location = url.substr(0, a);
329    return location;
330  }
331}

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.