1$(document).ready(function () { 2 3 // Boutons play/pause du carousel 4 5 $('#playButton').click(function() { 6 //alert("toto"); 7 $('#my_carousel_a').carousel('cycle'); 8 }); 9 $('#pauseButton').click(function() { 10 //alert("toto2"); 11 $('#my_carousel_a').carousel('pause'); 12 }); 13 14 15 // Coordonne les deux carousels 16 if($('.carousel-sync')){ 17 $('.carousel-sync').on('slide.bs.carousel', function (ev) { 18 19 var dir = ev.direction === 'right' ? 'prev' : 'next'; 20 21 $('.carousel-sync').not('.sliding').addClass('sliding').carousel(dir); 22 }); 23 $('.carousel-sync').on('slid.bs.carousel', function (ev) { 24 25 $('.carousel-sync').removeClass('sliding'); 26 }); 27 28 } 29 30}); 31 32 33/*************************** LOAD HTML WHEN CLICK ON TABS **************************/ 34 35view_mag(); // LOADED FIRST 36 37$( "a[href='#view_mag']" ).click(function(){ 38 if ($("#view_mag .item-outer").length === 0) { 39 view_mag(); 40 } 41}); 42 43 44$( "a[href='#view_guide']" ).click(function(){ 45 if ($("#view_guide .item-outer").length === 0) { 46 view_guide(); 47 } 48}); 49 50$( "a[href='#view_divers']" ).click(function(){ 51 if ($("#view_divers .item-outer").length === 0) { 52 view_divers(); 53 } 54}); 55 56 57/***************************FONCTIONS **************************/ 58 59 60function view_mag(paged){ 61 if (!paged){ 62 paged = 1; 63 }; 64 65 jQuery.post( 66 ajaxurl, 67 { 68 'action': 'view_mag', 69 'paged': paged 70 }, 71 function(response){ 72 $("#view_mag #publication_1").append(response); // insert in html// 73 74 } 75 ).done(function() { 76 $("#view_mag .spinner").hide(); 77 $("#view_mag .voir-plus").show(); 78 // hide spinner //
79 if ($('#view_mag .item-outer').last().data('found-posts') == $('#view_mag .item-outer').length){ 80 $("#view_mag .voir-plus").hide(); // if it's the last post, hide load more button// 81 } 82 83 84 }); 85} 86 87function view_guide(paged){ 88 if (!paged){ 89 paged = 1; 90 }; 91 92 jQuery.post( 93 ajaxurl, 94 { 95 'action': 'view_guide', 96 'paged': paged 97 }, 98 function(response){ 99 $("#view_guide #publication_2").append(response); 100 } 101 ).done(function() { 102 $("#view_guide .spinner").hide(); 103 $("#view_guide .voir-plus").show(); 104 // hide spinner // 105 if ($('#view_guide .item-outer').last().data('found-posts') == $('#view_guide .item-outer').length){ 106 $("#view_guide .voir-plus").hide(); // if it's the last post, hide load more button// 107 } 108 109 110 }); 111 112} 113 114function view_divers(paged){ 115 if (!paged){ 116 paged = 1; 117 }; 118 119 jQuery.post( 120 ajaxurl, 121 { 122 'action': 'view_divers', 123 'paged': paged 124 }, 125 function(response){ 126 $("#view_divers #publication_3").append(response); 127 } 128 129 ).done(function() { 130 $("#view_divers .spinner").hide(); 131 $("#view_divers .voir-plus").show(); 132 // hide spinner // 133 if ($('#view_divers .item-outer').last().data('found-p
133osts') == $('#view_divers .item-outer').length){ 134 $("#view_divers .voir-plus").hide(); // if it's the last post, hide load more button// 135 } 136 137 138 }); 139 140} 141 142 143 144$('#view_mag .voir-plus').click(function(){ 145 $('#view_mag .voir-plus').hide(); 146 $("#view_mag .spinner").show(); 147 var pa = $('#view_mag .item-outer').last().attr('data-paged'); 148 pa = parseInt(pa) + 1; 149 view_mag(pa); 150}) 151 152$('#view_guide .voir-plus').click(function(){ 153 $('#view_guide .voir-plus').hide(); 154 $("#view_guide .spinner").show(); 155 var pa = $('#view_guide .item-outer').last().attr('data-paged'); 156 pa = parseInt(pa) + 1; 157 view_guide(pa); 158}) 159 160$('#view_divers .voir-plus').click(function(){ 161 $('#view_divers .voir-plus').hide(); 162 $("#view_divers .spinner").show(); 163 var pa = $('#view_divers .item-outer').last().attr('data-paged'); 164 pa = parseInt(pa) + 1; 165 view_divers(pa); 166}) 167 168 169/************************************** // Zone menu principal *******************************************/ 170 171 172var a = $("#menu-menu-principal > li"); 173a.addClass('dropdown mega-dropdown'); 174 175var a = $("#menu-menu-principal > li > a"); 176a.addClass('dropdown-toggle'); 177a.attr('data-toggle', 'dropdown'); 178a.attr('aria-expanded', 'true'); 179 180var a = $(".sub-menu"); 181a.addClass('dropdown-menu mega-dropdown-menu'); 182 183var a = $("#menu-menu-principal > li > ul > li"); 184a.addClass('colmenu3'); 185 186var a = $(".sub-menu ul"); 187a.addClass('affiche'); 188 189var a = $(".colmenu3 > a"); 190a.addClass('titre_menu'); 191 192var a = $(".colmenu3 ul li ul li a"); 193a.addClass('col_classic'); 194 195if ($('#zone1 .headerLogo').css ('text-align')=='center'){ 196 $('#mainNav ul').addClass('centred'); 197} 198 199if (window.matchMedia("(min-width: 768px)").matches) { 200 201 $("#menu-menu-principal > li ").each(function() { 202 $(this) 203 .find("a") 204 .removeClass("dropdown-toggle") 205 .addClass("menuN1Seul"); 206 $(this).click(function() { 207 window.location.href = $(this) 208 .find("a") 209 .attr("href"); 210 }); 211 }); 212 $("#menu-menu-principal > li ").mouseover(function() { 213 $(this) 214 .find("ul") 215 .addClass("show"); 216 }); 217 $("#menu-menu-principal > li ").mouseout(function() { 218 $(this) 219 .find("ul") 220 .removeClass("show"); 221 }); 222 223} else { 224 $("#menu-menu-principal li").each(function() { 225 if ($(this).has("ul").length == 0) { 226 $(this) 227 .find("a") 228 .removeClass("dropdown-toggle") 229 .addClass("menuN1Seul"); 230 $(this).click(function() { 231 window.location.href = $(this) 232 .find("a") 233 .attr("href"); 234 }); 235 } 236}); 237 238} 239
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.