1(function($) { 2 3 4 $(document).ready(function(){ 5 6 7 $(".custom_amount").find(".alg_open_price").attr("placeholder","Any other amount"); 8 9 $(".et_pb_accordion_item").find(".et_pb_toggle_title").on("click",function(e){ 10 if($(this).parent().hasClass("et_pb_toggle_open")) { 11 e.preventDefault(); 12 var $par = $(this).parent(); 13 $par.removeClass("et_pb_toggle_open"); 14 $par.addClass("et_pb_toggle_close"); 15 } 16 }); 17 18 19 function onClick(event) { 20 event.preventDefault(); 21 } 22 /* Recherche avancée */ 23 24 /* Filtre Pays */ 25 $("#advanced_pays").on("mouseenter",function(){ 26 $(".countries_filters").show(); 27 $(".axes_filters").hide(); 28 $(".campagnes_filters").hide(); 29 $(".langues_filters").hide(); 30 $(".annees_filters").hide(); 31 $(".thematiques_filters").hide(); 32 }); 33 $(".countries_filters").on("mouseleave",function(){ 34 $(".countries_filters").hide(); 35 }) 36 /* Filtre Axes */ 37 $("#advanced_axes").on("mouseenter",function(){ 38 $(".axes_filters").show(); 39 $(".campagnes_filters").hide(); 40 $(".countries_filters").hide(); 41 }); 42 $(".axes_filters").on("mouseleave",function(){ 43 $(".axes_filters").hide(); 44 }) 45 /* Filtre Campagnes */ 46 $("#advanced_campagne").on("mouseenter",function(){ 47 $(".campagnes_filters").show(); 48 $(".axes_filters").hide(); 49 $(".countries_filters").hide(); 50 }); 51 $(".campagnes_filters").on("mouseleave",function(){ 52 $(".campagnes_filters").hide(); 53 }) 54 55 56 /* Filtre Langue */ 57 $("#advanced_langue").on("mouseenter",function(){ 58 $(".langues_filters").show(); 59 $(".countries_filters").hide(); 60 $(".annees_filters").hide(); 61 $(".thematiques_filters").hide(); 62 }); 63 $(".langues_filters").on("mouseleave",function(){ 64 $(".langues_filters").hide(); 65 }) 66 /* Filtre Annee */ 67 $("#advanced_annee").on("mouseenter",function(){ 68 $(".langues_filters").hide(); 69 $(".countries_filters").hide(); 70 $(".annees_filters").show(); 71 $(".thematiques_filters").hide(); 72 }); 73 $(".annees_filters").on("mouseleave",function(){ 74 $(".annees_filters").hide(); 75 }) 76 /* Filtre Thematique */ 77 $("#advanced_thematique").on("mouseenter",function(){ 78 $(".langues_filters").hide(); 79 $(".countries_filters").hide(); 80 $(".annees_filters").hide(); 81 $(".thematiques_filters").show(); 82 }); 83 $(".thematiques_filters").on("mouseleave",function(){ 84 $(".thematiques_filters").hide(); 85 }) 86 87 88 $(".countries_filters input, .axes_filters input, .campagnes_filters input, .annees_filters input, .langues_filters input, .thematiques_filters input").on("change",function(){ 89 if($(this).is(":checked")){ 90 $(this).parent().find(".childs_ul").addClass("open"); 91 } 92 else { 93 $(this).parent().find(".childs_ul").removeClass("open"); 94 } 95 }); 96 97 $("#toggle_langue .dsm-toggle-switch").on("change",function(){ 98 var url =""; 99 if($("#toggle_langue .dsm-toggle-switch").is(":checked")) { 100 var url = $("#trp-floater-ls a:not(.trp-ls-disabled-language)").attr("href"); 101 } 102 else { 103 var url = $("#trp-floater-ls a:not(.trp-ls-disabled-language)").attr("href"); 104 } 105 window.location.href = url; 106 }); 107 108 if($("#trp-floater-ls a:not(.trp-ls-disabled-language)").find("img").attr("alt") != "en_GB") { 109 $("#toggle_langue .dsm-toggle-switch").attr("checked", "checked"); 110 } 111 112 113 window.et_pb_smooth_scroll = function( $target, $top_section, speed, easing ) { 114 var $window_width = jQuery( window ).width(); 115 $menu_offset = -1; 116 var headerHeight = jQuery("#main-header").outerHeight()+jQuery("#second_header").outerHeight(); 117 if ( jQuery ('#wpadminbar').length && $window_width <= 980 ) { 118 $menu_offset += jQuery( '#wpadminbar' ).outerHeight() + headerHeight; 119 } else { 120 $menu_offset += headerHeight; 121 } 122 console.log($menu_offset); 123 //fix sidenav scroll to top 124 if ( $top_section ) { 125 $scroll_position = 0; 126 } else { 127 $scroll_position = $target.offset().top - $menu_offset; 128 } 129 // set swing (animate's scrollTop default) as default value 130 if( typeof easing === 'undefined' ){ 131 easing = 'swing'; 132 } 133 jQuery( 'html, body' ).animate( { scrollTop : $scroll_position }, speed, easing ); 134 } 135 136 137window.addEventListener('DOMContentLoaded', function(ev){ 138 if (window.location.hash) { 139 var origHash = window.location.hash; 140 window.location.hash = ''; 141 142 jQuery(function() { 143 window.setTimeout(function() { 144 window.location.hash = origHash; 145 }, 600); 146 }); 147 } 148}); 149 150window.addEventListener('hashchange', scrollToAnchor); 151 152function scrollToAnchor(ev){ 153 ev.preventDefault(); 154 155 if (!window.location.hash) { 156 return false;
157 } 158 159 var anchorTarget = jQuery(window.location.hash); 160 161 if (!anchorTarget.length) { 162 return false; 163 } 164 165 // Let the browser finish the current process, before scrolling up/down. 166 jQuery(function() { 167 window.setTimeout(function(){ 168 var offset = 0; 169 var headerHeight = jQuery("#main-header").outerHeight()+jQuery("#second_header").outerHeight(); 170 if ( jQuery ('#wpadminbar').length ) { 171 offset += jQuery( '#wpadminbar' ).outerHeight() + headerHeight; 172 } else { 173 offset += headerHeight; 174 } 175 176 console.log(offset); 177 var anchorTop = anchorTarget.offset().top; 178 anchorTop -= offset; 179 180 jQuery( 'html, body' ).animate({ scrollTop: anchorTop }); 181 }, 0); 182 }); 183 184 return false; 185} 186 187 }); 188 189})(jQuery);
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.