PageSourceSearch

https://www.lacouronne-rouen.fr/assets/js/main.js

js lacouronne-rouen.fr collected 2026-09-25 19:11:24 UTC 7,846 bytes, 257 lines download raw bytes

1
2(function ($) {
3    "use strict";
4
5    /*==================================================================
6    [ Load page ]*/
7    $(".animsition").animsition({
8        /* inClass: 'fade-in',
9        outClass: 'fade-out',
10        inDuration: 1500,
11        outDuration: 800,
12        linkElement: '.animsition-link',
13        loading: true,
14        loadingParentElement: 'html',
15        loadingClass: 'animsition-loading-1',
16        loadingInner: '<div class="cp-spinner cp-meter"></div>',
17        timeout: false,
18        timeoutCountdown: 5000,
19        onLoadEvent: true,
20        browser: [ 'animation-duration', '-webkit-animation-duration'],
21        overlay : false,
22        overlayClass : 'animsition-overlay-slide',
23        overlayParentElement : 'html',
24        transition: function(url){ window.location.href = url; } */
25    });
26    
27    /*==================================================================
28    [ Back to top ]*/
29    var windowH = $(window).height()/2;
30
31    $(window).on('scroll',function(){
32        if ($(this).scrollTop() > windowH) {
33            $("#myBtn").css('display','flex');
34        } else {
35            $("#myBtn").css('display','none');
36        }
37    });
38
39    $('#myBtn').on("click", function(){
40        $('html, body').animate({scrollTop: 0}, 300);
41    });
42
43
44    /*==================================================================
45    [ Fixed Header ]*/
46    var headerDesktop = $('.container-menu-desktop');
47    var wrapMenu = $('.wrap-menu-desktop');
48    var posWrapHeader = $(headerDesktop).height() - $(wrapMenu).height();
49
50    if($(window).scrollTop() > posWrapHeader) {
51        $(headerDesktop).addClass('fix-menu-desktop');
52        $(wrapMenu).css('top',0); 
53    }  
54    else {
55        $(headerDesktop).removeClass('fix-menu-desktop');
56        $(wrapMenu).css('top',posWrapHeader - $(this).scrollTop()); 
57    }
58
59    $(window).on('scroll',function(){
60        if($(this).scrollTop() > posWrapHeader) {
61            $(headerDesktop).addClass('fix-menu-desktop');
62            $(wrapMenu).css('top',0); 
63        }  
64        else {
65            $(headerDesktop).removeClass('fix-menu-desktop');
66            $(wrapMenu).css('top',posWrapHeader - $(this).scrollTop()); 
67        } 
68    });
69
70
71    /*==================================================================
72    [ Menu mobile ]*/
73    $('.btn-show-menu-mobile').on('click', function(){
74        $(this).toggleClass('is-active');
75        $('.menu-mobile').slideToggle();
76    });
77
78    var arrowMainMenu = $('.arrow-main-menu-m');
79
80    for(var i=0; i<arrowMainMenu.length; i++){
81        $(arrowMainMenu[i]).on('click', function(){
82            $(this).parent().find('.sub-menu-m').slideToggle();
83            $(this).toggleClass('turn-arrow-main-menu-m');
84        })
85    }
86
87    $(window).resize(function(){
88        if($(window).width() >= 992){
89            if($('.menu-mobile').css('display') == 'block') {
90                $('.menu-mobile').css('display','none');
91                $('.btn-show-menu-mobile').toggleClass('is-active');
92            }
93
94            $('.sub-menu-m').each(function(){
95                if($(this).css('display') == 'block') { console.log('hello');
96                    $(this).css('display','none');
97                    $(arrowMainMenu).removeClass('turn-arrow-main-menu-m');
98                }
99            });
100                
101        }
102    });
103
104    /*==================================================================
105    [ Show / hide modal search ]*/
106    $('.js-show-modal-search').on('click', function(){
107        $('.modal-search-header').addClass('show-modal-search');
108        $(this).css('opacity','0');
109    });
110
111    $('.js-hide-modal-search').on('click', function(){
112        $('.modal-search-header').removeClass('show-modal-search');
113        $('.js-show-modal-search').css('opacity','1');
114    });
115
116    $('.container-search-header').on('click', function(e){
117        e.stopPropagation();
118    });
119    
120    /*==================================================================
121    [ Scroll mouse btn ]*/
122    $('.scroll-slider1').on('click', function(event){
123        event.preventDefault();
124        $('html, body').animate({scrollTop: $($(this).attr('href')).offset().top}, 500);
125    });
126
127    /*==================================================================
128    [ Daterangepicker ]*/
129    $('.my-calendar').daterangepicker({
130        "singleDatePicker": true,
131        "showDropdowns": true,
132        locale: {
133            format: 'DD/MM/YYYY'
134        },
135    });
136
137    var myCalendar = $('.my-calendar');
138    var isClick = 0;
139
140    $(window).on('click',function(){ 
141        isClick = 0;
142    });
143
144    $(myCalendar).on('apply.daterangepicker',function(){ 
145        isClick = 0;
146    });
147
148    $('.btn-calendar').on('click',function(e){ 
149        e.stopPropagation();
150
151        if(isClick == 1) isClick = 0;   
152        else if(isClick == 0) isClick = 1;
153
154        if (isClick == 1) {
155            myCalendar.focus();
156        }
157    });
158
159    $(myCalendar).on('click',function(e){ 
160        e.stopPropagation();
161        isClick = 1;
162    });
163
164    $('.daterangepicker').on('click',function(e){ 
165        e.stopPropagation();
166    });
167
168    /*==================================================================
169    [ Play video 01 ]*/
170    var srcOld = $('.video-mo-01').children('iframe').attr('src');
171
172    $('[data-target="#modal-video-01"]').on('click',function(){
173        $('.video-mo-01').children('iframe')[0].src += "&autoplay=1";
174
175        setTimeout(function(){
176            $('.video-mo-01').css('opacity','1');
177        },300);      
178    });
179
180    $('[data-dismiss="modal"]').on('click',function(){
181        $('.video-mo-01').children('iframe')[0].src = srcOld;
182        $('.video-mo-01').css('opacity','0');
183    });
184
185    /*==================================================================
186    [ Show more/less menu ]*/
187    $('.js-show-more-menu').on('click', function(){
188        $('.js-more-menu').slideDown();
189        $(this).hide();
190        $('.js-show-less-menu').show();
191    });
192
193     $('.js-show-less-menu').on('click', function(){
194        $('.js-more-menu').slideUp();
195        $(this).hide();
196        $('.js-show-more-menu').show();
197    });
198
199    /*==================================================================
200    [ Show more/less menu ]*/
201    $('.js-show-more-gallery').on('click', function(){
202        $('.js-more-gallery').slideDown();
203        $(this).hide();
204        $('.js-show-less-gallery').show();
205    });
206
207     $('.js-show-less-gallery').on('click', function(){
208        $('.js-more-gallery').slideUp();
209        $(this).hide();
210        $('.js-show-more-gallery').show();
211    });
212
213
214    /*==================================================================
215    [ Hover item menu ]*/
216    $('.block3-child1-name').on('mouseover', function(){
217        $(this).parent().addClass('hov-block3');
218    });
219
220    $('.block3-child1-name').on('mouseout', function(){
221        $(this).parent().removeClass('hov-block3');
222    });
223
224    /*---------------------------------------------*/
225    $('.block4-txt-name').on('mouseover', function(){
226        $(this).parent().parent().parent().addClass('hov-block4');
227    });
228
229    $('.block4-txt-name').on('mouseout', function(){
230        $(this).parent().parent().parent().removeClass('hov-block4');
231    });
232
233    $('.block4-pic').on('mouseover', function(){
234        $(this).parent().addClass('hov-block4');
235    });
236
237    $('.block4-pic').on('mouseout', function(){
238        $(this).parent().removeClass('hov-block4');
239    });
240
241    /*==================================================================
242    [ Hover ]*/
243    $('.hov2, .hov3').on('mouseenter', function(){
244        var obj = $(this);
245           
246        if(!$(obj).hasClass('hover')) {
247            $(obj).addClass('hover');
248
249            setTimeout(function(){
250                $(obj).removeClass('hover');
251            }, 1100);
252        }
253    });
254
255    
256
257})(jQuery);

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.