1var is_load = false; 2var loading = setTimeout(function(){ if(is_load) { $('#loader').addClass('stop'); $('body').removeClass('no-scroll'); } }, 4000); 3 4$(document).ready(function() { 5 var last_click; 6 7 function changeURLYT(url, play) { 8 var tab = url.split('&'); 9 10 $(tab).each(function(i, v) { 11 var options = v.split('='); 12 if(options.length > 1 && options[0] == "autoplay") { 13 options[1] = (play ? 1 : 0); 14 } 15 16 v = options.join("="); 17 tab[i] = v; 18 }); 19 20 return tab.join('&'); 21 } 22 23 if($(window).width() > 992) { 24 if ($('#content_slide').length > 0) { 25 $('#content_slide').pagepiling({ 26 menu: null, 27 direction: 'horizontal', 28 verticalCentered: true, 29 sectionsColor: [], 30 anchors: anchor, 31 scrollingSpeed: 700, 32 loopBottom: false, 33 loopTop: false, 34 css3: true, 35 navigation: { 36 'textColor': '#000', 37 'bulletsColor': '#000', 38 'position': 'right', 39 'tooltips': ['section1', 'section2', 'section3', 'section4'] 40 }, 41 normalScrollElements: null, 42 normalScrollElementTouchThreshold: 5, 43 touchSensitivity: 5, 44 keyboardScrolling: true, 45 sectionSelector: '.section', 46 animateAnchor: false, 47 48 //events 49 onLeave: function(index, nextIndex, direction){ 50 if (nextIndex == $('.pp-section').length) { 51 $('.arrows .left').removeClass('hidden'); 52 $('.arrows .right').addClass('hidden'); 53 } else if(nextIndex > 1) { 54 // $('header').addClass('reduce'); 55 // $('main').addClass('expand'); 56 $('.arrows .left').removeClass('hidden'); 57 $('.arrows .right').removeClass('hidden'); 58 } else { 59 // $('header').removeClass('reduce'); 60 // $('main').removeClass('expand'); 61 $('.arrows .right').removeClass('hidden'); 62 $('.arrows .left').addClass('hidden'); 63 } 64 }, 65 afterLoad: function(anchorLink, index){ 66 if (anchorLink !== "actualites") { 67 $.post( 68 ajaxurl, 69 { 70 'action': 'loadActu', 71 }, 72 function(response){ 73 var appendResponse = $('.actu_section .actu').parent().parent(); 74 $('.actu_section .actu').parent().remove(); 75 76 $(appendResponse).append(response); 77 $('.actu .more a').unbind().on('click', actu_link); 78 return; 79 } 80 ); 81 } 82 }, 83 afterRender: function(){}, 84 }); 85 } 86 } 87 88 $('#open_mobile').on('click', function() { 89 if ($(this).hasClass('back')) { 90 var ul = $(last_click).closest('ul'); 91 var li = $(last_click).closest('li'); 92 93 $(ul).removeClass('sub-open'); 94 $(li).removeClass('open'); 95 96 $('#open_mobile').removeClass('back'); 97 $('#open_mobile').addClass('clicked'); 98 } else { 99 $('#navbar').toggleClass('open'); 100 $(this).toggleClass('clicked'); 101 $('body').toggleClass('no-scroll'); 102 } 103 }); 104 105 $($("table thead tr:nth-child(2)")[0]).children(":eq(1)").after($($("table thead tr:nth-child(2)")[0]).children(":eq(0)")); 106 107 $('.bg').on('click', function() { 108 $('.modal').css('display', 'block'); 109 $('main').addClass('modal_open'); 110 111 var urlYt = $('.youtube_player iframe').attr('src'); 112 if ($('.youtube_player iframe').length > 0) { 113 $('.youtube_player iframe').attr('src', changeURLYT(urlYt, 1)); 114 } 115 });
116 117 $('.modal .close').on('click', function() { 118 $('.modal').css('display', 'none'); 119 $('main').removeClass('modal_open'); 120 121 var urlYt = $('.youtube_player iframe').attr('src'); 122 $('.youtube_player iframe').attr('src', changeURLYT(urlYt, 0)); 123 }); 124 125 $('header .search #search').on('click', function() { 126 $('form#search-form').toggleClass('show'); 127 $(this).toggleClass('close'); 128 }); 129 130 $('.menu-item-has-children > a').on('click', function(e) { 131 if ($(window).width() < 992 && e.type == "click") { 132 e.preventDefault(); 133 last_click = $(this); 134 135 var ul = $(this).closest('ul'); 136 var li = $(this).closest('li'); 137 var sub = $(li).find('.sub-menu'); 138 139 $(ul).addClass('sub-open'); 140 $(li).addClass('open'); 141 142 $(sub).children('a').remove(); 143 $(sub).prepend($(this).clone()); 144 $('#open_mobile').addClass('back'); 145 $('#open_mobile').removeClass('clicked'); 146 } else if (is_mobile) { 147 e.preventDefault(); 148 } 149 }); 150 151 $('.menu-item-has-children').on('mouseenter mouseleave', function(e) { 152 var li = $(this); 153 var sub = $(li).find('.sub-menu'); 154 if(sub) { 155 if ($(window).width() > 992 && e.type == "mouseenter") { 156 var li_left = $(li).offset().left; 157 var sub_width = $(sub).width(); 158 if(li + sub_width > $(window).width()) { 159 $(sub).css({ 160 'left': 'inherit', 161 'right': $(li).width() + li_left 162 }); 163 } else { 164 $(sub).css({ 165 'left': li_left, 166 }); 167 } 168 169 $(sub).addClass('show'); 170 } else { 171 $(sub).removeClass('show'); 172 } 173 } 174 }); 175 176 var actu_link = function(e) { 177 e.preventDefault(); 178 //$(this).closest('.actu').toggleClass('open'); 179 $('body').toggleClass('actu_open'); 180 if ($(window).width() > 992) { 181 $.fn.pagepiling.setMouseWheelScrolling(($('body').hasClass('actu_open') ? false : true)); 182 $.fn.pagepiling.setAllowScrolling(($('body').hasClass('actu_open') ? false : true)); 183 } 184 $('.arrows').toggleClass('hidden'); 185 186 if ($('body').hasClass('actu_open')) { 187 $('body').addClass('no-scroll'); 188 $('.actu .more a').html('Fermer'); 189 $(this).closest('.actu').clone().addClass('modal_actu open').appendTo('body'); 190 $('.actu .more a').unbind().on('click', actu_link); 191 $('.actu .more a').css('display', 'none'); 192 $('.modal_actu .more a').css('display', 'block'); 193 } else { 194 $('body').removeClass('no-scroll'); 195 $('.actu .more a').css('display', 'block'); 196 $('.modal_actu').remove(); 197 $('.actu .more a').html('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 129 129"><path d="M40.4 120.3c-.8.8-1.8 1.2-2.9 1.2s-2.1-.4-2.9-1.2c-1.6-1.6-1.6-4.2 0-5.8l51-51-51-51c-1.6-1.6-1.6-4.1 0-5.8 1.6-1.6 4.2-1.6 5.7 0l53.9 53.9c1.6 1.5 1.6 4.2 0 5.8l-53.8 53.8z"></path></svg> Lire la suite '); 198 } 199 }; 200 201 $('body').on('click', function(e) { 202 if ($('.modal_actu').length > 0 && $(e.target).closest(".modal_actu").length === 0 && $(e.target).closest(".more").length === 0) { 203 $('.modal_actu .content_actu .more a').trigger('click'); 204 } 205 }); 206 207 $('.actu .more a').on('click', actu_link); 208 209 if ($('.arrows').length > 0) { 210 $('#pp-nav').prepend($('.arrows > div.left')); 211 $('#pp-nav').append($('.arrows > div.right')); 212 $('#pp-nav').addClass('arrows'); 213 } 214 215 $('.arrows .left').click(function(){ 216 $.fn.pagepiling.moveSectionUp(); 217 }); 218 219 $('.arrows .right').click(function(){ 220 $.fn.pagepiling.moveSectionDown(); 221 }); 222 223 $(window).click(function(e) { 224 if($(e.target).closest('.modal').length != 0 && e.originalEvent !== undefined) { 225 $('.modal .close').trigger('click'); 226 } 227 });
228 229 $(window).resize(function() { 230 if ($(window).width() < 992 && $('.pp-section').length > 0) { 231 $.fn.pagepiling.destroy('all'); 232 } 233 }); 234 235 $('.pointer_map').mouseenter(function() { 236 if ($(window).width() > 992) { 237 $.fn.pagepiling.setMouseWheelScrolling(false); 238 } 239 }) 240 .mouseleave(function() { 241 if ($(window).width() > 992) { 242 $.fn.pagepiling.setMouseWheelScrolling(true); 243 } 244 }); 245 246 if (typeof is_mobile !== 'undefined' && $('.pp-section').length > 0) { 247 $.fn.pagepiling.destroy('all'); 248 } 249 250 $('main').removeClass('load'); 251 252 AOS.init({ 253 disable: 'mobile' 254 }); 255}); 256 257$(window).on('load', function() { 258 if (!$('#loader').hasClass('stop')) { 259 is_load = true; 260 } else { 261 $('#loader').addClass('stop'); 262 $('body').removeClass('no-scroll'); 263 } 264});
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.