1$(function() { 2 3 if(isMobile()) { 4 5 $(".menu_footer").find("p").click(function(){ 6 //alert("You clicked on p " + $(this).text()); 7 8 //$(".menu_footer > ul").slideUp(200); 9 $(this).parent().find('ul').slideToggle(200); 10 }); 11 12 13 } 14 15 16 17 $(".auto_submit").change(function() { 18 $(this).parents("form").submit(); 19 }); 20 21 $('a[href^="#"]').click(function(){ 22 var id = $(this).attr("href"); 23 var offset = ($(id).offset().top)-64; 24 $('html, body').animate({scrollTop: offset}, 'slow'); 25 return false; 26 }); 27 28 29 30 $("#openall").click(function(){ 31 $(".station_link").each(function(){ 32 window.open($(this).attr("href")); 33 }); 34 return false; 35 }); 36 37 $("#close_fullscreen_map").click(function() { 38 $("#map").removeClass("fullscreen"); 39 $("#close_fullscreen_map").hide(300); 40 }); 41 42 43 $('#btn_france').click(function(){ 44 $("#ombre").fadeIn(300); 45 $("#bloc_france").slideDown(300); 46 return false; 47 }); 48 49 $('.close_france').click(function(){ 50 $("#ombre").fadeOut(300); 51 $("#bloc_france").slideUp(300); 52 return false; 53 }); 54 55 56 $("#open_station_maj").click(function(e) { 57 e.preventDefault(); 58 $("#ombre").fadeIn(300); 59 $(".popin_station_maj").slideDown(300); 60 return false; 61 }); 62 63 64 $(".close_station_maj").click(function() { 65 $(".popin_station_maj").slideUp(100); 66 $("#ombre").fadeOut(100); 67 }); 68 69 70 71 $("#popin_login_open").click(function(e) { 72 e.preventDefault(); 73 $("#ombre").fadeIn(300); 74 $(".popin_login").slideDown(300); 75 $("#id_login_pseudo").focus(); 76 return false; 77 }); 78 79 80 $(".popin_close").click(function() { 81 $(".popin_login").fadeOut(100); 82 $("#ombre").fadeOut(100); 83 }); 84 85 86 87 $("#btn_option_filtre").click(function() { 88 $("#bloc_option_filtre").slideToggle(300); 89 $("i", this).toggleClass("fa-down-dir fa-up-dir"); 90 }); 91 92 $(".btn_recherche_rapide").click(function() { 93 94 if(isMobile()) { 95 closeMenuNav(); 96 closeMenuUser(); 97 } 98 99 100 var hauteurBlocRecRapide = $('.nav_scroll').height(); 101 if ( ! hauteurBlocRecRapide ) { 102 hauteurBlocRecRapide = $('header').height(); 103 } 104 105 $("#bloc_recherche_rapide").css('top', hauteurBlocRecRapide+'px'); 106 107 $("#bloc_recherche_rapide").slideToggle(300); 108 $("#bloc_recherche_rapide .recherche").focus() 109 110 }); 111 112 113 $("#close_recherche_rapide").click(function() { 114 $("#bloc_recherche_rapide").slideUp(300); 115 }); 116 117 118 //$('.bloc_cont').hide(); 119 $('.bloc_lib').click(function() { 120 $(this).next('.bloc_cont').slideToggle(400); 121 $("i", this).toggleClass("fa-down-dir fa-up-dir"); 122 }); 123 124 $(".bloc_cont_close").click(function(){ 125 $(this).parent(".bloc_cont").slideUp(200); 126 }); 127 128 129 /* 130 $(".confirm").click(function(){ 131 link = $(this).attr('data-link'); 132 txt = $(this).attr('data-text'); 133 134 $(this + ' .popin_text').html(txt); 135 136 $('#link_content').attr("href", link); 137 $("#pop_confirm_suppression").slideDown(); 138 $("#ombre").fadeIn(100); 139 }); 140 141 $(".btn_close_popin").click(function(){ 142 $(this).closest(".popin").slideUp(200); 143 $("#ombre").fadeOut(200); 144 }); 145 */ 146 147 148 //$('.bloc_em').css("cursor", "pointer"); 149 $('.bloc_em').click(function() { 150 var href = $(this).find("a").attr("href"); 151 if(href) { 152 window.location = href; 153 } 154 }); 155 156 157 158 159 160 $('.css_cache').css("display", "none"); 161 162 function carb_affiche(id_btn, class_col) { 163 $(class_col).show(); 164 165 $(id_btn).toggleClass("btn_carb btn_carb_on"); 166 $(id_btn + " > i").toggleClass("fa-vide fa-check"); 167 } 168 169 function carb_cache(id_btn, class_col) { 170 171 $(class_col).hide(); 172 $(id_btn).toggleClass("btn_carb_on btn_carb"); 173 //$(id_btn).removeClass('btn_carb_on').addClass('btn_carb'); 174 //$(id_btn > i).toggleClass("fa-check fa-menu"); 175 176 $(id_btn + " > i").toggleClass("fa-check fa-vide"); 177 } 178 179 function toggleCarb(className,carb,mcarb){ 180 if ( className == 'btn_carb_on' ) { 181 carb_cache('#btn_' + mcarb ,'.col_' + mcarb) 182 } else { 183 carb_affiche('#btn_' + mcarb,'.col_' + mcarb); 184 } 185 $.ajax({ 186 type: "GET", 187 url: "/toggle-carb.php?carb="+carb 188 }) 189 } 190 191 $('#btn_sp98').click(function() { 192 toggleCarb(this.className,"s98","sp98"); 193 }); 194 $('#btn_sp95').click(function() { 195 toggleCarb(this.className,"s95","sp95"); 196 }); 197 $('#btn_e10').click(function() { 198 toggleCarb(this.className,"e10","e10"); 199 }); 200 $('#btn_gaz').click(function() { 201 toggleCarb(this.className,"gaz","gaz"); 202 }); 203 $('#btn_gazp').click(function() { 204 toggleCarb(this.className,"gazplus","gazp"); 205 }); 206 $('#btn_e85').click(function() { 207 toggleCarb(this.className,"e85","e85"); 208 }); 209 $('#btn_gpl').click(function() { 210 toggleCarb(this.className,"gpl","gpl"); 211 }); 212 213 214 215 216}); 217 218 219/* 220$(window).scroll(function() { 221 if($(document).scrollTop() > 120) { 222 //$("#menu_presta_scroll").fadeIn(500); 223 $("#link_to_top").fadeIn(500); 224 225 //$("nav").addClass('nav_scroll'); 226 227 //$("#page_presta_menu").fadeOut(300); 228 229 //$("#menu_presta_scroll").addClass("menu_presta_scroll"); 230 //$("#menu_presta_scroll").show(); 231 } else { 232 //$("#menu_presta_scroll").fadeOut(300); 233 $("#link_to_top").fadeOut(500); 234 //$("nav").removeClass('nav_scroll'); 235 //$("#page_presta_menu").fadeIn(500); 236 //$("#menu_presta_scroll").removeClass("menu_presta_scroll"); 237 //$("#menu_presta_scroll").hide(); 238 } 239}); 240*/ 241 242$(document).ready(function() { 243 244 $("#bloc_option_filtre").hide(); 245 246 247 248 if( ! isMobile()) { 249 $('.help').tipTop(); 250 $(".equal_height").matchHeight(); 251 } 252 253 setInterval("jQuery('.blink').fadeOut(500);jQuery('.blink').fadeIn(500);",0); 254 255 256 257 var typemenu = ""; 258 259 if ( typemenu == 'clone' ) { 260 // Create a clone of the menu, right next to original. 261 $('nav').addClass('original').clone().insertAfter('nav').addClass('cloned').css('position','fixed').css('top','0').css('margin-top','0').css('z-index','9999').removeClass('original').hide(); 262 scrollIntervalID = setInterval(stickIt, 10); 263 }else{ 264 265 var menu_mobile_display = $('#menu_mobile').css('display'); 266 267 //var stickyHeaderTop = $('header').offset().top; 268 var stickyHeaderHeight = $('header').height(); 269 //alert(stickyHeaderHeight); 270 271 if( menu_mobile_display=='none') { 272 $(window).scroll(function(){ 273 274 if( $(window).scrollTop() > (stickyHeaderHeight - 50) ) { 275 $('nav').addClass('nav_scroll'); 276 //$(".nav_scroll").slideDown(300); 277 $("#bloc_recherche_rapide").hide(); 278 $("#link_to_top").show(); 279 280 281 } else { 282 $('nav').removeClass('nav_scroll'); 283 $("#bloc_recherche_rapide").hide(); 284 $("#link_to_top").hide(); 285 286 } 287 }); 288 289 }else{ 290 291 292 initMenuMobile(); 293 } 294 295 296 297 } 298 299 300}); 301 302 303function viewToggle(id){ 304 $('#'+id).slideToggle(240); 305} 306 307function afficher_service(id_s){ 308 $.ajax({ 309 type: "GET", 310 url: '/ajax_liste_service.php?id_s='+id_s, 311 success: function(data){ 312 $('#bloc-picto-service-'+id_s).html(data); 313 314 315 $(".help").tipTop(); 316 317 } 318 }); 319} 320 321function closeMenuNav() { 322 $("nav").hide(); 323 $("#btn_menu_main_mob i").removeClass("fa-cancel").addClass("fa-menu"); 324} 325 326function closeRecRapide() { 327 $("#bloc_recherche_rapide").hide(); 328} 329 330function closeMenuUser() { 331 $("#login_nav").hide(); 332 $("#btn_menu_user_mob i").removeClass("fa-user-times").addClass("fa-user"); 333} 334 335function initMenuMobile() { 336 337 338 $('.js_stop_link').click(function(e) { 339 e.preventDefault(); 340 $(this).next('.fallback').slideToggle(); 341 $(this).css('color', '#ffffff'); 342 $("i", this).toggleClass("fa-chevron-down fa-chevron-up"); 343 }); 344 345 $("#btn_menu_main_mob").click(function() { 346 $("html, body").animate({ scrollTop: 0 }, "slow"); 347 348 349 closeMenuUser(); 350 closeRecRapide(); 351 352 $("i", this).toggleClass("fa-menu fa-cancel"); 353 $("nav").slideToggle(300); 354 }); 355
356 $("#btn_menu_user_mob").click(function() { 357 358 $("html, body").animate({ scrollTop: 0 }, "slow"); 359 360 closeMenuNav(); 361 closeRecRapide(); 362 363 $("i", this).toggleClass("fa-user fa-user-times"); 364 $("#login_nav").slideToggle(300); 365 }); 366 367 368 369 /* 370 $("#mobile_menu_close").click(function(){ 371 $("nav").removeClass('scroll_left'); 372 }); 373 */ 374 375 /* MENU UL * 376 /* 377 $("#mobile_menu_btn").click(function(){ 378 $("nav").slideToggle(); 379 }); 380 */ 381 382} 383 384 385function isMobile() { 386 if ( $(window).width() < 1024 ) { 387 return true; 388 }else{ 389 return false; 390 } 391} 392 393function stickIt() { 394 395 var orgElementPos = $('.original').offset(); 396 orgElementTop = orgElementPos.top; 397 398 if ($(window).scrollTop() >= (orgElementTop)) { 399 $("#link_to_top").show(); 400 orgElement = $('.original'); 401 coordsOrgElement = orgElement.offset(); 402 leftOrgElement = coordsOrgElement.left; 403 widthOrgElement = orgElement.css('width'); 404 $('.cloned').addClass('nav_scroll'); 405 $('.cloned').css('left',leftOrgElement+'px').css('top',0).css('width',widthOrgElement).show(); 406 $('.original').css('visibility','hidden'); 407 } else { 408 $("#link_to_top").hide(); 409 $('.cloned').removeClass('nav_scroll').hide(); 410 $('.original').css('visibility','visible'); 411 } 412} 413 414
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.