1// * * * * * * * * * * 2// - - functions 3// * * * * * * * * * * 4 5// // Fonction pour désactiver le scroll 6function disableScroll() { 7 $(window).on('scroll', preventScroll); 8 $(window).on('keydown', preventKeyScroll); 9 $(window).on('wheel touchmove', preventTouchScroll); 10} 11 12// Fonction pour réactiver le scroll 13function enableScroll() { 14 $(window).off('scroll', preventScroll); 15 $(window).off('keydown', preventKeyScroll); 16 $(window).off('wheel touchmove', preventTouchScroll); 17} 18 19// Bloque le défilement lié à la molette ou au toucher 20function preventTouchScroll(e) { 21 e.preventDefault(); 22} 23 24// Bloque le défilement par les touches du clavier 25function preventKeyScroll(e) { 26 // Liste des touches de scroll : Haut (38), Bas (40), Espace (32), Page Haut (33), Page Bas (34) 27 const keys = [32, 33, 34, 38, 40]; 28 if (keys.includes(e.keyCode)) { 29 e.preventDefault(); 30 } 31} 32 33// Empêche le défilement classique 34function preventScroll() { 35 window.scrollTo(0, 0); 36} 37 38 39 40function showNotification(message, type = "info", duration = 2500) { 41 const container = document.getElementById("notification-container"); 42 43 const alert = document.createElement("div"); 44 const bootstrapType = (type === "error") ? "danger" : type; 45 46 alert.className = `alert alert-${bootstrapType} alert-dismissible fade show shadow`; 47 if (bootstrapType === "danger") { 48 alert.classList.add("custom-alert-danger"); 49 } 50 51 alert.setAttribute("role", "alert"); 52 alert.innerHTML = ` 53 ${message} 54 <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button> 55 `; 56 57 container.appendChild(alert); 58 59 setTimeout(() => { 60 alert.classList.remove("show"); 61 alert.classList.add("hide"); 62 setTimeout(() => alert.remove(), 500); 63 }, duration); 64} 65 66 67// Exemple d'utilisation 68disableScroll(); // Appelle cette fonction pour bloquer le scroll 69// enableScroll(); // Appelle cette fonction pour réactiver le scroll 70 71 72 73 74// * * * * * * * * * * 75// - - READY 76// * * * * * * * * * * 77$(document).ready(function(){ 78 79 "use strict"; 80 81 console.log('page chargée ! jQuery => ' + jQuery.fn.jquery); 82 83 // * * * * * * * * * * 84 // - Chargement en cours... 85 // * * * * * * * * * * 86 var pageLoader = function () { 87 setTimeout(function () { 88 $('#page-loader').fadeOut(); 89 enableScroll(); 90 }, 500); 91 }; 92 93 pageLoader(); 94 95 // * * * * * * * * * * 96 // - chargement des fonts 97 // * * * * * * * * * * 98 /* 99 var font_Questa = new FontFaceObserver('Questa'); 100 var font_RiversideAvenue = new FontFaceObserver('RiversideAvenue'); 101 102 var fonts_promises = [ 103 font_Questa.load(), 104 font_RiversideAvenue.load() 105 ]; 106 107 Promise.all(fonts_promises).then(function() { 108 console.log('Toutes les polices sont chargées'); 109 pageLoader(); 110 }).catch(function() { 111 console.log('Une ou plusieurs polices n\'ont pas pu être chargées'); 112 }); 113 */ 114 115// DEV 116 // * * * * * * * * * * DEV 117 // - Chargement URL de reunionest vers reunionest-23mars 118 // * * * * * * * * * * 119 /* 120 if( $('#page-url-change').length > 0 ){ 121 122 const bloc = document.getElementById('page-url-change'); 123 124 bloc.addEventListener('click', function(event) { 125 const link = event.target.closest('a'); 126 127 if (link && bloc.contains(link)) { 128 event.preventDefault(); // Empêche la navigation par défaut 129 130 let href = link.getAttribute('href'); 131 132 if (href.includes('www.reunionest.fr')) { 133 const newHref = href.replace('www.reunionest.fr', 'www.reunionest.fr'); 134 135 link.setAttribute('href', newHref); // Met à jour le lien 136 console.log('Lien modifié :', newHref); 137 138 // ð Redirige automatiquement vers le nouveau lien 139 window.location.href = newHref; 140 } else { 141 // Si pas besoin de changer l'URL, suivre le lien normalement 142 window.location.href = href; 143 } 144 } 145 }); 146 }; // - if page-url-change 147 */ 148 149 150 // * * * * * * * * * * 151 // affiche MENU - bloquer le scroll 152 // * * * * * * * * * * 153 $(document).on("click","#menu-toggle", function(event){ 154 155 event.preventDefault(); 156 157 // Toggle la classe "visible" sur .toggle-content 158 $('.menu-full-wrapper').toggleClass('menu-full-wrapper-in'); 159 160 // MENU en croix 161 $('.menu-burger-tiret-1').toggleClass('mb-tiret-1'); 162 $('.menu-burger-tiret-2').toggleClass('mb-tiret-2'); 163 $('.menu-burger-tiret-3').toggleClass('mb-tiret-3'); 164 165 if ($('.menu-full-wrapper').hasClass('menu-full-wrapper-in')) { 166 disableScroll(); 167 } else { 168 enableScroll(); 169 }; 170 171 }); 172 173 174 // * * * * * * * * * * 175 // Sticky .navbar 176 // * * * * * * * * * * 177 let lastScrollTop = 0; 178 179 $(window).on('scroll', function() { 180 181 let scrollTop = $(this).scrollTop(); 182 let navbar = $('.navbar'); 183 184 if (scrollTop > 300) { 185 if (scrollTop > lastScrollTop) { 186 187 // Scroll vers le bas â cacher la navbar 188 navbar.addClass('hide-navbar'); 189 $('.navbar').addClass('scrolled'); 190 191 } else { 192 193 // Scroll vers le haut â montrer la navbar 194 navbar.removeClass('hide-navbar'); 195 196 } 197 } else { 198 199 // Si on est en haut de page (< 200px), toujours montrer la navbar 200 navbar.removeClass('hide-navbar'); 201 } 202 203 if (scrollTop < 300) { 204 $('.navbar').removeClass('scrolled'); 205 } 206 207 lastScrollTop = scrollTop; 208 }); 209 210 211 // * * * * * * * * * * 212 // Back to top button 213 // * * * * * * * * * * 214 $(window).scroll(function () { 215 if ($(this).scrollTop() > 300) { 216 $('.back-to-top').fadeIn('slow'); 217 } else { 218 $('.back-to-top').fadeOut('slow'); 219 } 220 }); 221 $('.back-to-top').click(function () { 222 $('html, body').animate({scrollTop: 0}, 1500, 'easeInOutExpo'); 223 return false;
224 }); 225 226 // - SWIPER / .accueil-reservez-swiper 227 /* 228 if( $('.accueil-reservez-swiper').length > 0 ){ 229 var accueil_reservez_swiper = new Swiper(".accueil-reservez-swiper", { 230 slidesPerView: 'auto', 231 // spaceBetween: 30, 232 // centeredSlides: true, 233 //slidesOffsetBefore: 20, 234 pagination: { type: 'none' }, 235 navigation: { 236 nextEl: '._swiper-button-next', // Cible le bouton suivant 237 prevEl: '._swiper-button-prev', // Cible le bouton précédent 238 }, 239 }); 240 }; // - if .accueil-reservez-swiper 241 */ 242 243 244 // - SWIPER / .accueil-agenda-swiper 245 if( $('.accueil-agenda-swiper').length > 0 ){ 246 var accueil_agenda_swiper = new Swiper(".accueil-agenda-swiper", { 247 slidesPerView: 'auto', 248 // spaceBetween: 30, 249 // centeredSlides: true, 250 //slidesOffsetBefore: 20, 251 pagination: { type: 'none' }, 252 navigation: { 253 nextEl: '._swiper-button-next', // Cible le bouton suivant 254 prevEl: '._swiper-button-prev', // Cible le bouton précédent 255 }, 256 }); 257 }; // - if .accueil-agenda-swiper 258 259 260 // - SWIPER / .accueil-artisans-swiper 261 if( $('.accueil-artisans-swiper').length > 0 ){ 262 var accueil_artisans_swiper = new Swiper(".accueil-artisans-swiper", { 263 slidesPerView: 'auto', 264 // spaceBetween: 30, 265 // centeredSlides: true, 266 //slidesOffsetBefore: 20, 267 pagination: { type: 'none' }, 268 navigation: { 269 nextEl: '._swiper-button-next', // Cible le bouton suivant 270 prevEl: '._swiper-button-prev', // Cible le bouton précédent 271 }, 272 }); 273 }; // - if .accueil-artisans-swiper 274 275 276 277 // tippy menu-tools-wrapper 278 var tippy_recherche = tippy('.tippy-rechercher', { content: 'Je recherche', zIndex: 999999, placement: 'bottom', theme: 'custom', arrow: true }); 279 var tippy_contact = tippy('.tippy-contact', { content: 'Nous contacter', zIndex: 999999, placement: 'bottom', theme: 'custom', arrow: true }); 280 var tippy_brochures = tippy('.tippy-brochures', { content: 'Nos brochures', zIndex: 999999, placement: 'left', theme: 'custom', arrow: true }); 281 var tippy_carte = tippy('.tippy-carte', { content: 'Carte interactive', zIndex: 999999, placement: 'left', theme: 'custom', arrow: true }); 282 283 // tippy partage 284 var partage_facebook = tippy('.partage-facebook', { content: 'Partager sur Facebook', zIndex: 999999, placement: 'bottom', theme: 'custom', arrow: true }); 285 var partage_x = tippy('.partage-x', { content: 'Partager sur X', zIndex: 999999, placement: 'bottom', theme: 'custom', arrow: true }); 286 var partage_whatsapp = tippy('.partage-whatsapp', { content: 'Partager sur WhatsApp', zIndex: 999999, placement: 'bottom', theme: 'custom', arrow: true }); 287 var partage_mail = tippy('.partage-mail', { content: 'Partager par Mail', zIndex: 999999, placement: 'bottom', theme: 'custom', arrow: true }); 288 289 290 291 // - SWIPER / .vous-aimerez-swiper 292 if( $('.vous-aimerez-swiper').length > 0 ){ 293 294 var vous_aimerez_swiper = new Swiper(".vous-aimerez-swiper", { 295 slidesPerView: 'auto', 296 loop: true, 297 autoplay: { 298 delay: 1500, 299 disableOnInteraction: true 300 }, 301 //spaceBetween: 30, 302 centeredSlides: true, 303 //slidesOffsetBefore: 20, 304 pagination: { type: 'none' }, 305 navigation: { 306 nextEl: '._swiper-button-next', // Cible le bouton suivant 307 prevEl: '._swiper-button-prev', // Cible le bouton précédent 308 }, 309 }); 310 311 }; // - if .vous-aimerez-swiper 312 313 314 // - SWIPER / .a-proximite-swiper 315 if( $('.a-proximite-swiper').length > 0 ){ 316 317 var a_proximite_swiper = new Swiper(".a-proximite-swiper", { 318 slidesPerView: 5, // Affiche 5 slides à la fois 319 slidesPerGroup: 2, // Fait défiler 2 slides à la fois 320 loop: true, // Boucle infinie 321 loopAdditionalSlides: 5, // Prévient les bugs de boucle 322 speed: 2000, // Transition fluide sur 2 secondes 323 spaceBetween: 30, // Espacement entre slides 324 autoplay: { 325 delay: 0, // Aucune pause, défilement continu 326 disableOnInteraction: false, // Continue après interaction 327 }, 328 pagination: { type: 'none' }, 329 navigation: { 330 nextEl: "._swiper-button-next", 331 prevEl: "._swiper-button-prev", 332 }, 333 }); 334 335 }; // - if .a-proximite-swiper 336 337 338 339 340 // * * * ACCUEL CARTE POI communes * * * // 341 // sur la page home.twig 342 343 344 345 // * * * * * * * * * * 346 // - BTN utile oui / non 347 // * * * * * * * * * * 348 if( $('.avis-item').length > 0 ){ 349 350 $('.avis-wrapper').on('click', '.avis-item', function() { 351 352 let id = $(this).data('id'); 353 let utile = $(this).data('utile'); 354 let avis_champ = 'utile_' + utile; 355 let avis_chiffre = '.avis-chiffre-' + utile; 356 357 $.ajax({ 358 url: './Assets/actions/user-actions.php', 359 type: 'POST', 360 data: { id: id, avis_champ: avis_champ, action: 'avis_UPDATE' }, 361 dataType: 'json' 362 }) 363 .then(function(response) { 364 if (response.status === 'success') { 365 366 // - mise à jiour du nouveau chiffre 367 $(avis_chiffre).html(response.newValue); 368 369 // - blocage du BTN avis-item 370 $('.avis-item').prop('disabled', true); 371 372 } else { 373 374 $('.avis-wrapper').html('â ï¸ Erreur : ' + response.message); 375 376 } 377 }) 378 .catch(function(xhr, status, error) { 379 380 console.error('Erreur AJAX :', status, error); 381 $('.avis-wrapper').html('â Erreur technique lors de l\'appel AJAX.'); 382 }); 383 384 }); // - click 385 386 387 }; // - if .avis-item 388 389 390 391 392 // * * * * * * * * * * 393 // - - PRESTATAIRE fiche 394 // * * * * * * * * * * 395 396 // - telephone 397 if( $('.telephone-contenu').length > 0 ){ 398 399 $('.telephone-contenu').hide(); 400 401 // Toggle slide au clic 402 $('.telephone-titre').on('click', function() { 403 $(this).next('.telephone-contenu').slideToggle(); 404 }); 405 406 }; // - if .telephone-contenu 407 408 // - ancre vers avis-partage-ancre 409 if( $('#encart-sticky-btn-partager').length > 0 ){ 410 $('#encart-sticky-btn-partager').on('click', function() { 411 $('html, body').animate({ 412 scrollTop: $('#avis-partage-ancre').offset().top 413 }, 800); // 800 ms pour un scroll fluide 414 }); 415 }; // - if #encart-sticky-btn-partager 416 417 418 // - BTN plandacces 419 if( $('#plandacces-ancre').length > 0 ){ 420 $('#plandacces-ancre').on('click', function() { 421 $('#plandacces-wrapper').slideToggle(); 422 }); 423 }; // - if #encart-sticky-btn-partager 424 425 426 // * * * * * * * * * * 427 // - - ANCRE 428 // * * * * * * * * * * 429 if( $('.ancre').length > 0 ){ 430 431 $('[data-scroll-to]').on('click', function () { 432 const targetId = $(this).data('scroll-to'); 433 const targetElement = $('#' + targetId); 434 435 if (targetElement.length) { 436 $('html, body').animate({ 437 scrollTop: targetElement.offset().top 438 }, 500); // 500 ms pour l'effet smooth 439 } 440 }); 441 442 }; // - if ancre 443 444 445 446 447 448 // * * * * * * * * * * 449 // - - MODAL rechercher 450 // * * * * * * * * * * 451 $(document).on("click", ".rechercher-modal-open", function(event) { 452 453 event.preventDefault(); 454 455 console.log("Bouton Rechercher cliqué"); 456 457 $(".modal-body").html("<br><br><div align='center'><img src='./Assets/img/loader.gif' alt=''><br>- - Chargement en cours - -</div><br><br>"); 458 459 $.post( 460 'Assets/fuse-init/rechercher-modal.php', 461 { }, 462 function(data){ 463 $(".modal-body").html(data); 464 // $('html, body').animate({scrollTop: $('.modal-body').offset().top}, 500); 465 } 466 ); // - post 467 468 }); // - click 469 470 471 // * * * * * * * * * * 472 // - - MODAL Séjour individuel => contact 473 // * * * * * * * * * * 474 $(document).on("click", ".sejour-contact-modal-open", function(event) { 475 476 event.preventDefault(); 477 478 console.log("Bouton Sejour Contact cliqué"); 479 480 /* 481 482 $(".modal-body").html("<br><br><div align='center'><img src='./Assets/img/loader.gif' alt=''><br>- - Chargement en cours - -</div><br><br>"); 483 484 $.post( 485 'Assets/modal/modal-sejour-contact.php', 486 { }, 487 function(data){ 488 $(".modal-body").html(data); 489 // $('html, body').animate({scrollTop: $('.modal-body').offset().top}, 500); 490 } 491 ); // - post 492 */ 493 494 }); // - click 495 496 $('#modal_sejour_contact').on('show.bs.modal', function (event) { 497 498 // bouton déclencheur 499 var button = $(event.relatedTarget); 500 501 // récupération des attributs 502 var titre = button.data('titre'); 503 var id = button.data('id'); 504 505 console.log('#modal_sejour_contact > titre : ' + titre); 506 507 // injection dans la modal 508 var modal = $(this);
509 modal.find('.modal-title').html(titre); 510 modal.find('#pageModalContent').html( 511 'ID de la page : <b>' + id + '</b><br>Titre : ' + titre 512 ); 513 514 // injection des inputs 515 $('#hiddenTitre').val(titre); 516 $('#hiddenId').val(id); 517 }); 518 519 520 // * * * * * * * * * * 521 // - - popup promo 522 // * * * * * * * * * * 523 if( $('.btn-promo-fermer').length > 0 ){ 524 525 $(".btn-promo-fermer").click(function (e) { 526 e.preventDefault(); 527 $('.zone-promotionnelle').hide(); 528 $('.black-support').hide(); 529 return false; 530 }); 531 532 $(".black-support").click(function (e) { 533 e.preventDefault(); 534 $('.zone-promotionnelle').hide(); 535 $('.black-support').hide(); 536 return false; 537 }); 538 539 }; // -- if btn-promo-fermer 540 541 542 543 // * * * * * * * * * * 544 // - - fancybox-3 BLOG 545 // * * * * * * * * * * 546 if (typeof $.fancybox !== 'undefined' && $('[data-fancybox="gallery"]').length > 0) { 547 $('[data-fancybox="gallery"]').fancybox({ 548 buttons: [ 549 "zoom", 550 "slideShow", 551 "thumbs", 552 "close" 553 ], 554 loop: true, 555 transitionEffect: "slide" 556 }); 557 }else{ 558 console.log("Fancybox absent"); 559 } 560 561 // - DIV ouverture Fancybox 562 if( $('.open-gallery').length > 0 ){ 563 564 $('.open-gallery').on('click', function (e) { 565 e.preventDefault(); 566 567 var images = $('a[data-fancybox="gallery"]').map(function () { 568 return { 569 src: $(this).attr('href'), 570 title: $(this).find('img').attr('alt') || '' 571 }; 572 }).get(); // .get() pour transformer en tableau JS pur 573 574 $.fancybox.open(images, { 575 loop: true, 576 thumbs: { 577 autoStart: true 578 } 579 }); 580 }); 581 582 }; 583 584 // - bloque le menu contextuel sur Fancybox 585 $(document).on('contextmenu', '.fancybox-content', function(e) { 586 e.preventDefault(); 587 }); 588 589 // * * * * * * * * * * 590 // - - form DATEPICKER 591 // * * * * * * * * * * 592 if( $('#datepicker').length > 0 ){ 593 594 Inputmask("99/99/9999", { placeholder: "jj/mm/aaaa" }).mask("#datepicker"); 595 596 $( "#datepicker" ).datepicker({ 597 firstDay: 1, 598 altField: "#datepicker", 599 closeText: 'Fermer', 600 prevText: 'Précédent', 601 nextText: 'Suivant', 602 currentText: 'Aujourd\'hui', 603 monthNames: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'], 604 monthNamesShort: ['Janv.', 'Févr.', 'Mars', 'Avril', 'Mai', 'Juin', 'Juil.', 'Août', 'Sept.', 'Oct.', 'Nov.', 'Déc.'], 605 dayNames: ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'], 606 dayNamesShort: ['Dim.', 'Lun.', 'Mar.', 'Mer.', 'Jeu.', 'Ven.', 'Sam.'], 607 dayNamesMin: ['D', 'L', 'M', 'M', 'J', 'V', 'S'], 608 weekHeader: 'Sem.', 609 dateFormat: 'dd/mm/yy' 610 }); // - #datepicker 611 612 613 // Vérification manuelle du format à la sortie du champ 614 /* 615 $("#datepicker").on("blur", function () { 616 const dateInput = $(this).val(); 617 const regex = /^(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[0-2])\/\d{4}$/; 618 619 if (!regex.test(dateInput)) { 620 alert("Veuillez entrer une date au format jj/mm/aaaa."); 621 $(this).val(""); // On efface la mauvaise saisie 622 } 623 }); 624 */ 625 626 }; // - if datepicker 627 628 629 // * * * * * * * * * * 630 // - - form telephone 631 // * * * * * * * * * * 632 if( $('#telephone').length > 0 ){ 633 634 Inputmask("09 99 99 99 99", { placeholder: "__ __ __ __ __" }).mask("#telephone"); 635 636 }; // if nmb_personnes 637 638 // * * * * * * * * * * 639 // - - form nmb_personnes 640 // * * * * * * * * * * 641 if( $('#nmb_personnes').length > 0 ){ 642 643 Inputmask("999", { placeholder: "" }).mask("#nmb_personnes"); 644 645 }; // if nmb_personnes 646 647 648 649 650 // * * * * * * * * * * 651 // - - Sticky activites + swiper 652 // * * * * * * * * * * 653 if( $('.activites-header-infos-reserver-wrapper').length > 0 ){ 654 655 var sticky = new Sticky('.activites-header-infos-reserver-wrapper', 656 { 657 marginTop : 100, 658 // marginBottom : 500, 659 stickyWrap : true, 660 stickyFor : 1000, 661 stickyClass : "activites-header-galerie-show", 662 // stickyContainer: '.sticky_container' 663 } 664 ); 665 666 var reserverSwiper = new Swiper(".reserverSwiper", { 667 slidesPerView: 1, 668 pagination: { 669 el: ".swiper-pagination", 670 clickable: true, 671 }, 672 observeParents: true, 673 }); 674 675 window.addEventListener('scroll', function () { 676 677 const stickyElement = document.querySelector('.activites-header-infos-reserver-wrapper'); 678 const swiperContainer = document.querySelector('.reserverSwiper'); 679 680 const rect = stickyElement.getBoundingClientRect(); 681 682 // Vérifie si l'élément sticky est visible dans la fenêtre 683 if (rect.top < window.innerHeight && rect.bottom >= 0) { 684 685 // Si Swiper n'est pas encore initialisé 686 if (!swiperContainer.classList.contains('swiper-initialized')) { 687 688 var reserverSwiper = new Swiper(".reserverSwiper", { 689 slidesPerView: 1, 690 pagination: { 691 el: ".swiper-pagination", 692 clickable: true, 693 }, 694 observeParents: true, 695 }); 696 } 697 698 } 699 }); // window.addEventListener 700 701 }; 702 703 704 // * * * * * * * * * * 705 // - - Sticky BLOG 706 // * * * * * * * * * * 707 if( $('.blog-sticky-wrapper').length > 0 ){ 708 709 var blogStickyWrapper = new Sticky('.blog-sticky-wrapper', 710 { 711 stickyWrap : true, 712 stickyFor : 1000, 713 } 714 ); 715 716 }; 717 718 719 720 // * * * * * * * * * * 721 // - - OWL carousel 722 // * * * * * * * * * * 723 if( $('.owl-carousel').length > 0 ){ 724 725 $('.owl-carousel').owlCarousel({ 726 center : true, 727 items : 5, 728 loop : true, 729 margin : 10, 730 center : true, 731 732 autoplay: true, 733 autoplayTimeout: 3000, 734 autoplayHoverPause: true, 735 736 responsive:{ 737 0 : { items:1 }, 738 600 : { items:3 }, 739 1200 : { items:5 } 740 } 741 }); 742 743 let isDragging = false;
744 745 // Quand le carrousel commence à glisser 746 $(".owl-carousel") 747 .on("mousedown touchstart", function () { 748 isDragging = false; 749 }) 750 .on("mousemove touchmove", function () { 751 isDragging = true; 752 }); 753 754 // Empêche le clic sur les liens si câétait un glissement 755 $(".owl-carousel").on("click", ".carousel-link", function (e) { 756 if (isDragging) { 757 e.preventDefault(); 758 e.stopImmediatePropagation(); 759 } 760 }); 761 762 763 }; // -- if owl-carousel 764 765 766 767 768 769 // * * * * * * * * * * * * 770 // * * infobulles 771 // * * * * * * * * * * * * 772 const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]') 773 const tooltipList = [...tooltipTriggerList].map(el => new bootstrap.Tooltip(el)) 774 775 776 777 778//// - ancre sur URL ? 779var hash = window.location.hash; 780console.log("Hash de l'URL :", hash); 781 782$(window).on('load', function () { 783 var hash = window.location.hash; 784 785 if (hash) { 786 var $target = $(hash); 787 788 if ($target.length) { 789 setTimeout(function () { 790 791 var rect = $target[0].getBoundingClientRect(); 792 var elementTop = rect.top + window.pageYOffset; 793 794 var viewportOffset = window.innerHeight * 0.3; // 30vh 795 796 var scrollTop = elementTop - viewportOffset; 797 798 $('html, body').animate({ 799 scrollTop: scrollTop 800 }, 500); 801 802 }, 100); 803 } 804 } 805}); 806 807 808}); // - - ready
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.