1$(document).ready(function(){ 2 3 4 /* GESTION DU MENU MOBILE */ 5 6 var deplieMM=false; 7 8 $('#launch-menu-mobile').bind("click",function(e){ 9 $("nav#menu-level1").toggleClass("open-nav"); 10 $("body").toggleClass("open-site"); 11 $(this).toggleClass( "active" ); 12 if (deplieMM==false) deplieMM=true; else deplieMM=false; 13 e.preventDefault(); 14 }); 15 16 /* sous menus nav */ 17 18 $("#contentMenuMobile div.dev:not(.actif)").hide(); 19 $("#contentMenuMobile a.titre").bind('click',function(e){ 20 $(this).next().toggle(); 21 $(this).toggleClass('titreActif'); 22 e.preventDefault(); 23 }); 24 25 if($("span#fixResponsive").width()>=4){ 26 $( "#menu-level1" ).append( $( "#entete-pratique #shortcuts" ) ); 27 $( "#menu-level1" ).append( $( "#entete-pratique form" ) ); 28 29 /* hauteur menu mobile */ 30 $("nav#menu-level1").css("height",$(window).height()); 31 32 } 33 34 /* gestion sous menu mobile */ 35 if($("span#fixResponsive").width()>=4){ 36 $("#menu-level1 #main-menu li.menu-item-has-children").removeAttr("onmouseover").removeAttr("onmouseout"); 37 $("#menu-level1 #main-menu li.menu-item-has-children a.main-menu-link").bind("click",function(e){ 38 $(this).next().toggle(); 39 e.preventDefault(); 40 }); 41 } 42 43 $( window ).resize(function() { 44 45 if($("span#fixResponsive").width()>=4){ 46 $( "#menu-level1" ).append( $( "#entete-pratique #shortcuts" ) ); 47 $( "#menu-level1" ).append( $( "#entete-pratique form" ) ); 48 /* hauteur menu mobile */ 49 $("nav#menu-level1").css("height",$(window).height()); 50 } 51 52 if($("span#fixResponsive").width()<4){ 53 $( "#entete-pratique" ).append( $( "#menu-level1 #shortcuts" ) ); 54 $( "#entete-pratique" ).append( $( "#menu-level1 form" ) ); 55 /* hauteur menu mobile */ 56 $("nav#menu-level1").css("height","auto"); 57 } 58 59 /* RAJOUT PADDING DYNAMIQUE SUR LES PAGES DE CONTENU */ 60 if ($("span#fixResponsive").width()<3) { 61 $("#tpl-page").css("padding-top",$("header").height()+20); 62 menuSuiveur(); 63 }else{ 64 $("#tpl-page").css("padding-top",0); 65 } 66 67 }); 68 69 /* RAJOUT PADDING DYNAMIQUE SUR LES PAGES DE CONTENU */ 70 if ($("span#fixResponsive").width()<3) { 71 $("#tpl-page").css("padding-top",$("header").height()+20); 72 } 73 74 75 $(".visuel p.share-actu, .block-actualite p.share-actu").each(function(i){ 76 77 var shareActuOn = "shareActu"+i; 78 79 $(this).bind("click",function(e){ 80 81 if(!window[shareActuOn]){ 82 console.log("init"); 83 window[shareActuOn]=false; 84 } 85 86 if(window[shareActuOn] == false){ 87 window[shareActuOn] = true; 88 $(this).parent().next().fadeIn("fast"); 89 }else{ 90 window[shareActuOn] = false; 91 $(this).parent().next().fadeOut("fast"); 92 } 93 94 e.preventDefault(); 95 }) 96 }); 97 98 99 100}); /* fin doc ready */ 101 102$(window).onload = initHeader(); 103 104/* ======== Fonctions ========================================================================== */ 105 106function activeCommune(nomCommune){ 107 108 if(nomCommune!=undefined){ 109 classEnCours = "."+nomCommune; 110 communeEnCours = nomCommune; 111 console.log("passCommune "+nomCommune+" // class : "+classEnCours+" // Commune : "+communeEnCours); 112 113 }else{ 114 classEnCours = "."+$("#sel-communes").val(); 115 communeEnCours = $("#sel-communes").val(); 116 console.log("passCommune "+$("#sel-communes").val()+" // class : "+classEnCours+" // Commune : "+communeEnCours); 117 } 118 119 // suppression des actifs 120 if($(".st0.actif").length){ 121 resetActifst0 = $(".st0.actif").attr("class").split(" ",1)+" st0"; 122 $(".st0.actif").attr("class",resetActifst0); 123 resetActifst1 = $(".st1.actif").attr("class").split(" ",1)+" st1"; 124 $(".st1.actif").attr("class",resetActifst1); 125 } 126 127 128 // déclaration du nouvel actif 129 st0EnCours = ".st0"+classEnCours; 130 classSt0 = "st0 "+communeEnCours+" actif"; 131 st1EnCours = ".st1"+classEnCours; 132 classSt1 = "st1 "+communeEnCours+" actif"; 133 134 135 $(st0EnCours).attr("class",classSt0); 136 $(st1EnCours).attr("class",classSt1); 137} 138 139/* AUTOSLIDE HEADER */ 140function initHeader() { 141 window.addEventListener('scroll', function(e){
142 var distanceY = window.pageYOffset || document.documentElement.scrollTop, 143 shrinkOn = 100, 144 header = document.querySelector("body"); 145 if (distanceY > shrinkOn) { 146 classie.add(header,"reduit"); 147 } else { 148 if (classie.has(header,"reduit")) { 149 classie.remove(header,"reduit"); 150 } 151 } 152 }); 153 154}
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.