1;(function ($, root, undefined) { 2 $(function () { 3 'use strict' 4 5 // ===================================================================== 6 // RESPONSIVE HELPER 7 // ===================================================================== 8 9 // responsive_helper(); 10 $('.menu a').on('click', function (e) { 11 console.log($(this).attr('href')) 12 }) 13 // ===================================================================== 14 // IE OBJECT FIT 15 // ===================================================================== 16 if (!Modernizr.objectfit) { 17 $('.img_cover_container').each(function () { 18 var $container = $(this), 19 imgUrl = $container.find('img').prop('src') 20 if (imgUrl) { 21 $container.css('backgroundImage', 'url(' + imgUrl + ')').addClass('object_fit_compat') 22 } 23 }) 24 } 25 26 if ($('.mc4wp-form-451').length) { 27 if ($('html').attr('lang') != 'fr-FR') { 28 $('.mc4wp-form-451 input[name="FNAME"]').attr('placeholder', 'Firstname') 29 $('.mc4wp-form-451 input[name="LNAME"]').attr('placeholder', 'Lastname') 30 $('.mc4wp-form-451 input[name="EMAIL"]').attr('placeholder', 'Your email adress') 31 $('.mc4wp-form-451 input[type="submit"]').attr('value', 'SEND') 32 } 33 } 34 35 // ===================================================================== 36 // RESPO TAB ROOM 37 // ===================================================================== 38 var to, target 39 $('.resp_tab').on('click', 'li', function (e) { 40 to = $(this).attr('data-target') 41 target = $(this) 42 .parent() 43 .siblings('div[data-type="' + to + '"]') 44 $(this).addClass('active').siblings('li').removeClass('active') 45 target.show().siblings('.tab').hide() 46 }) 47 // ==================================================================== 48 // TOGGLE 49 // ==================================================================== 50 51 // $('.site_header .toggle').on('click',function() { 52 // $(this).toggleClass('active'); 53 // $('.responsive_panel').toggleClass('opened'); 54 // $('body').toggleClass('frozen'); 55 // }); 56 57 $('.site_header .toggle').on('click', function () { 58 $(this).toggleClass('active') 59 $('.responsive_panel').toggleClass('opened') 60 $('body').toggleClass('panel_open') 61 $('html').toggleClass('frozen') 62 63 var maxH = $(window).height() - $('.site_header').height() 64 // $('.responsive_panel').css('max-height',maxH + 10 +'px'); 65 // $('.responsive_panel').outerHeight(maxH + 10); 66 }) 67 68 var menu = $('.responsive_panel') 69 var toggle = $('.site_header .toggle') 70 $(document).mouseup(function (e) { 71 if (menu.hasClass('opened')) { 72 if (!menu.is(e.target) && menu.has(e.target).length === 0 && !toggle.is(e.target) && toggle.has(e.target).length === 0) { 73 menu.removeClass('opened') 74 $('.toggle').removeClass('active') 75 $('html').removeClass('frozen') 76 } 77 } 78 }) 79 80 $(window).on('resize scroll', function () { 81 if ($('.action_booking .sub_menu').hasClass('visible')) { 82 $('.action_booking .sub_menu').removeClass('visible') 83 } 84 }) 85 86 $(window).on('resize', function (e) { 87 if ($('.site_header .toggle').hasClass('active')) { 88 $('.site_header .toggle').removeClass('active') 89 $('.responsive_panel').removeClass('opened') 90 $('html').removeClass('frozen') 91 } 92 }) 93 94 $(window).on('load resize', function () { 95 var maxH = $(window).height() - $('.site_header').height() 96 // $('.responsive_panel').css('max-height',maxH + 10 +'px'); 97 // $('.responsive_panel').outerHeight(maxH + 10);
98 }) 99 100 $('.responsive_panel .inner').mCustomScrollbar({ 101 axis: 'y', 102 theme: 'light', 103 }) 104 105 $('.responsive_panel .menu-item-has-children').each(function (e) { 106 $(this).append('<span class="sub-menu-toggle"><i class="fas fa-chevron-down"></i></span>') 107 }) 108 $('.menu-item-has-children.sub-menu-toggle > a').on('click', function (e) { 109 $(this).parent('.menu-item-has-children').toggleClass('open') 110 $(this).siblings('.sub-menu').slideToggle() 111 }) 112 113 $('.sub-menu-toggle').on('click', function (e) { 114 $(this).parent('.menu-item-has-children').toggleClass('open') 115 $(this).siblings('.sub-menu').slideToggle() 116 }) 117 118 // ===================================================================== 119 // FIXED MENU 120 // ===================================================================== 121 $(window).on('load scroll', function (e) { 122 if ($(window).scrollTop() > 120) { 123 // $('.site_header').addClass('fixed'); 124 if ($('.mtsnb-top').length) { 125 $('.site_header').css('top', '') 126 } 127 } else { 128 // $('.site_header').removeClass('fixed'); 129 if ($('.mtsnb-top').length) { 130 $('.site_header').css('top', $('.mtsnb-top').height()) 131 } 132 } 133 }) 134 135 // ===================================================================== 136 // AJAX EXEMPLE 137 // ===================================================================== 138 // var id, post; 139 // $('.selector').on('event',function(e){ 140 // id = $(this).attr('id'); 141 // 142 // $.post( 143 // ajaxurl, { 144 // 'action': 'get_something', 145 // 'id': id 146 // }, 147 // function(response) { 148 // post = $.parseJSON(response); 149 // console.log(post); 150 // } 151 // ); 152 // }); 153 154 // ===================================================================== 155 // GALLERY SLIDERS 156 // ===================================================================== 157 if ($('.slider_gallery').length) { 158 var slidesToShow 159 160 $.each($('.slider_gallery'), function (e) { 161 if ($(this).hasClass('slide_per_one')) { 162 slidesToShow = 1 163 164 $(this).slick({ 165 autoplay: true, 166 autoplaySpeed: 2000, 167 fade: true, 168 slidesToShow: slidesToShow, 169 slidesToScroll: 1, 170 appendArrows: $(this).parent().find('.slider_nav .slider_arrows'), 171 prevArrow: '<div class="slick-prev slick-arrow"></div>', 172 nextArrow: '<div class="slick-next slick-arrow"></div>', 173 dots: true, 174 appendDots: $(this).parent().find('.slider_nav .slider_dots'), 175 }) 176 } else if ($(this).hasClass('slide_per_two')) { 177 slidesToShow = 2 178 179 $(this).slick({ 180 slidesToShow: slidesToShow, 181 slidesToScroll: 1, 182 appendArrows: $(this).parent().find('.slider_nav .slider_arrows'), 183 prevArrow: '<div class="slick-prev slick-arrow"></div>', 184 nextArrow: '<div class="slick-next slick-arrow"></div>', 185 responsive: [ 186 { 187 breakpoint: 768, 188 settings: { 189 slidesToShow: 1, 190 }, 191 }, 192 ], 193 }) 194 } 195 // else 196 // { 197 // slidesToShow = 2; 198 // 199 // $(this).slick({ ² 200 // slidesToShow : slidesToShow, 201 // slidesToScroll: 1, 202 // appendArrows: $('.slide_per_two.slider_arrows'), 203 // prevArrow: '<div class="slick-prev">test</div>', 204 // nextArrow: '<div class="slick-next">test</div>', 205 // }); 206 // } 207 }) 208 } 209 210 // ===================================================================== 211 // MENU OPEN 212 // ===================================================================== 213 // $('a[href="#menu"], a[href="#menu1"]').on('click', function (e) { 214 // e.preventDefault() 215 // $('body').addClass('frozen') 216 // $('.menu_container').addClass('visible') 217 // $('#availpro-customers-satisfaction-widget').hide() 218 // }) 219 220 $(document).on('click', 'a[href*="#menu_"]', function (e) { 221 e.preventDefault() 222 var targetId = $(this).attr('href').substring(1) 223 $('.menu_container').removeClass('visible') 224 $('#' + targetId).addClass('visible') 225 }) 226 227 $('.menu_container .close').on('click', function (e) { 228 e.preventDefault() 229 $('body').removeClass('frozen') 230 $('.menu_container').removeClass('visible') 231 $('#availpro-customers-satisfaction-widget').show() 232 }) 233 234 var menu = $('.menu_container .menu_inner') 235 $(document).mouseup(function (e) { 236 if (!menu.is(e.target) && menu.has(e.target).length === 0) { 237 // menu.removeClass('opened'); 238 $('.menu_container').removeClass('visible') 239 $('body').removeClass('frozen') 240 } 241 }) 242 243 $('a[href="#menu2"]').on('click', function (e) { 244 e.preventDefault() 245 $('body').addClass('frozen') 246 $('.menu_container_2').toggleClass('visible') 247 $('#availpro-customers-satisfaction-widget').hide() 248 }) 249 250 $('.menu_container_2 .close').on('click', function (e) { 251 e.preventDefault() 252 $('body').removeClass('frozen') 253 $('.menu_container_2').removeClass('visible') 254 $('#availpro-customers-satisfaction-widget').show() 255 }) 256 257 var menu = $('.menu_container_2 .menu_inner') 258 $(document).mouseup(function (e) { 259 if (!menu.is(e.target) && menu.has(e.target).length === 0) { 260 // menu.removeClass('opened'); 261 $('.menu_container_2').removeClass('visible') 262 $('body').removeClass('frozen') 263 } 264 }) 265 266 // ===================================================================== 267 // MENU SCROLLBAR 268 // ===================================================================== 269 if ($('.menu_container').length && $(window).width() > 1024) { 270 $('.menu_container .inner_sc').mCustomScrollbar({ 271 axis: 'y', 272 // setLeft: 0, 273 // theme: 'dark-thin', 274 }) 275 } 276 277 if ($('.menu_container_2').length && $(window).width() > 1024) { 278 $('.menu_container_2 .inner_sc').mCustomScrollbar({ 279 axis: 'y', 280 // setLeft: 0, 281 // theme: 'dark-thin', 282 }) 283 } 284 285 // ===================================================================== 286 // ACTUALITES FILTER 287 // ===================================================================== 288 289 // ===================================================================== 290 // GRID AND FILTER 291 // ===================================================================== 292 var $isotope_grid = $('.posts_grid').isotope({ 293 itemSelector: '.post', 294 }) 295 296 $isotope_grid.imagesLoaded().progress(function () { 297 $isotope_grid.isotope('layout') 298 if (window.location.hash) { 299 var term_hash_raw = window.location.hash 300 var term_hash = term_hash_raw.substr(1) 301 $('.container_archive .filters .filter[data-slug="' + term_hash + '"]').click() 302 // $('html, body').animate({
303 // scrollTop: $('.site-content').offset().top - $('.site_header').height() 304 // }, 400); 305 } 306 307 // if() 308 }) 309 310 /* Filters */ 311 312 var filterValue 313 $('.filters .filter').on('click', function () { 314 $('.filters .filter').removeClass('active') 315 $(this).addClass('active') 316 if ($(this).attr('data-slug') != '*') { 317 filterValue = '.' + $(this).attr('data-slug') 318 } else { 319 filterValue = $(this).attr('data-slug') 320 } 321 322 $isotope_grid.isotope({ 323 filter: filterValue, 324 }) 325 if ($(window).width() < 1024) { 326 $('.filters .title_resp').toggleClass('active') 327 $(this).parent().slideToggle() 328 var li_txt = $(this).text() 329 $('.filters .title_resp span.text').html('').html(li_txt) 330 } 331 if ($(this).attr('data-slug') != '*') { 332 window.location.hash = $(this).attr('data-slug') 333 } 334 }) 335 336 $('.filters .title_resp').on('click', function () { 337 $(this).toggleClass('active') 338 $(this).siblings('ul').slideToggle() 339 }) 340 341 // $(document).ready(function() { 342 // // $(this).scrollTop(0); 343 // if ($('.container_archive .filters').length) { 344 // console.log('filters'); 345 // if (window.location.hash) { 346 // var term_hash_raw = window.location.hash; 347 // var term_hash = term_hash_raw.substr(1); 348 // console.log(term_hash); 349 // $('.container_archive .filters .filter[data-slug="'+term_hash+'"]').click(); 350 // $('html, body').animate({ 351 // scrollTop: $('.site-content').offset().top - $('.site_header').height() 352 // }, 400); 353 // } 354 // } 355 // 356 // }); 357 358 // ===================================================================== 359 // SINGLE POST GALLERY 360 // ===================================================================== 361 // $('.single_post .gallery').slick({}); 362 363 // ===================================================================== 364 // SLIDER HERO 365 // ===================================================================== 366 if ($('.gallery_hero').children().length > 1) { 367 $('.gallery_hero').slick({ 368 autoplay: true, 369 autoplaySpeed: 3000, 370 fade: true, 371 slidesToShow: 1, 372 slidesToScroll: 1, 373 arrows: false, 374 adaptativeHeight: true, 375 // appendArrows: $(this).parent().find('.slider_nav .slider_arrows'), 376 // prevArrow: '<div class="slick-prev slick-arrow"></div>', 377 // nextArrow: '<div class="slick-next slick-arrow"></div>', 378 dots: true, 379 // appendDots: $(this).parent().find('.slider_nav .slider_dots') 380 }) 381 } 382 383 $('.main_navigation .action_booking > a, .action_booking .close').on('click', function (e) { 384 e.preventDefault() 385 $('.action_booking .sub_menu').toggleClass('visible') 386 // window.location.href = '/contact/'; 387 }) 388 389 // $('.action_lang').on('click',function(e){ 390 // $(this).toggleClass('open'); 391 // // $('.action_lang .wpml-ls').toggleClass('visible'); 392 // }); 393 394 // ===================================================================== 395 // AXEPTIO 396 // ===================================================================== 397 $('a[href="#showAxeptioButton"]').on('click', function (e) { 398 showAxeptioButton() 399 }) 400 401 $('.menu .disabled > a').on('click', function (e) { 402 e.preventDefault() 403 }) 404 405 $('.menu-item > a').on('click', function (e) { 406 if (this.href.indexOf('actualites') != -1) { 407 if (window.location.href.indexOf('actualites') > -1) { 408 window.location.replace(this.href) 409 location.reload(true) 410 } 411 } 412 }) 413 414 // if ($('.container_archive .filters').length) { 415 // var term = getUrlParameter('term'); 416 // if (term) { 417 // $('html, body').animate({ 418 // scrollTop: $('#' + term).offset().top - header_offset - $('.taxo_quick_access').height() - 10 419 // }, 300); 420 // } 421 422 $('#newsletter_footer').on('submit', function (e) { 423 e.preventDefault() 424 $.post( 425 ajaxurl, 426 { 427 action: 'send_exeprience_newsletter', 428 email: $('#newsletter_footer input[name="email"]').val(), 429 }, 430 function (response) { 431 // post = $.parseJSON(response); 432 // console.log(response); 433 $('#newsletter_footer .reponse').show() 434 $(':input', '#newsletter_footer').not(':button, :submit, :reset, :hidden').val('').prop('checked', false).prop('selected', false) 435 } 436 ) 437 }) 438 439 $('#newsletter_bloc').on('submit', function (e) { 440 e.preventDefault() 441 $.post( 442 ajaxurl, 443 { 444 action: 'send_exeprience_newsletter', 445 email: $('#newsletter_footer input[name="email"]').val(), 446 firstname: $('#newsletter_footer input[name="firstname"]').val(), 447 lastname: $('#newsletter_footer input[name="lastname"]').val(), 448 }, 449 function (response) { 450 // post = $.parseJSON(response); 451 // console.log(response); 452 $('#newsletter_bloc .reponse').show() 453 $(':input', '#newsletter_bloc').not(':button, :submit, :reset, :hidden').val('').prop('checked', false).prop('selected', false) 454 } 455 ) 456 }) 457 }) 458})(jQuery, this)
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.