1(function($){ 2 3 /**Optimisation HOME 2019: debut */ 4 5 var Base64 = { 6 7 // private property 8 _keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", 9 10 // public method for encoding 11 encode : function (input) { 12 var output = ""; 13 var chr1, chr2, chr3, enc1, enc2, enc3, enc4; 14 var i = 0; 15 16 input = Base64._utf8_encode(input); 17 18 while (i < input.length) { 19 20 chr1 = input.charCodeAt(i++); 21 chr2 = input.charCodeAt(i++); 22 chr3 = input.charCodeAt(i++); 23 24 enc1 = chr1 >> 2; 25 enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); 26 enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); 27 enc4 = chr3 & 63; 28 29 if (isNaN(chr2)) { 30 enc3 = enc4 = 64; 31 } else if (isNaN(chr3)) { 32 enc4 = 64; 33 } 34 35 output = output + 36 this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + 37 this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4); 38 39 } 40 41 return output; 42 }, 43 44 // public method for decoding 45 decode : function (input) { 46 var output = ""; 47 var chr1, chr2, chr3; 48 var enc1, enc2, enc3, enc4; 49 var i = 0; 50 51 input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); 52 53 while (i < input.length) { 54 55 enc1 = this._keyStr.indexOf(input.charAt(i++)); 56 enc2 = this._keyStr.indexOf(input.charAt(i++)); 57 enc3 = this._keyStr.indexOf(input.charAt(i++)); 58 enc4 = this._keyStr.indexOf(input.charAt(i++)); 59 60 chr1 = (enc1 << 2) | (enc2 >> 4); 61 chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); 62 chr3 = ((enc3 & 3) << 6) | enc4; 63 64 output = output + String.fromCharCode(chr1); 65 66 if (enc3 != 64) { 67 output = output + String.fromCharCode(chr2); 68 } 69 if (enc4 != 64) { 70 output = output + String.fromCharCode(chr3); 71 } 72 73 } 74 75 output = Base64._utf8_decode(output); 76 77 return output; 78 79 }, 80 81 // private method for UTF-8 encoding 82 _utf8_encode : function (string) { 83 string = string.replace(/\r\n/g,"\n"); 84 var utftext = ""; 85 86 for (var n = 0; n < string.length; n++) { 87 88 var c = string.charCodeAt(n); 89 90 if (c < 128) { 91 utftext += String.fromCharCode(c); 92 } 93 else if((c > 127) && (c < 2048)) { 94 utftext += String.fromCharCode((c >> 6) | 192); 95 utftext += String.fromCharCode((c & 63) | 128); 96 } 97 else { 98 utftext += String.fromCharCode((c >> 12) | 224); 99 utftext += String.fromCharCode(((c >> 6) & 63) | 128); 100 utftext += String.fromCharCode((c & 63) | 128); 101 } 102 103 } 104 105 return utftext; 106 }, 107 108 // private method for UTF-8 decoding 109 _utf8_decode : function (utftext) { 110 var string = ""; 111 var i = 0; 112 var c = c1 = c2 = 0; 113 114 while ( i < utftext.length ) { 115 116 c = utftext.charCodeAt(i); 117 118 if (c < 128) { 119 string += String.fromCharCode(c); 120 i++; 121 } 122 else if((c > 191) && (c < 224)) { 123 c2 = utftext.charCodeAt(i+1); 124 string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); 125 i += 2; 126 } 127 else { 128 c2 = utftext.charCodeAt(i+1); 129 c3 = utftext.charCodeAt(i+2); 130 string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); 131 i += 3; 132 } 133 134 } 135 136 return string; 137 } 138 139 } 140 141 class ProcessFAHandler{ 142 constructor(){ 143 this.loadHomeMap(); 144 this.loadActus(); 145 this.loadSliderStories(); 146 this.loadSliderPartenaire(); 147 this.loadSocialStream(); 148 this.removeBreadcrumbsDuplication(); 149 this.renderJsAmorcage(); 150 this.loadHomeMobilePage(); 151 this.buttonActusEvents(); 152 this.clickContactParcours(); 153 // this.loadPartenaireNew(); 154 155 let $class = this; 156 157 if(typeof $('#breadcrumbs') != 'undefined'){ 158 $('#breadcrumbs a').each(function(){ $(this).removeAttr('href'); }); 159 } 160 161 if($('.tg-error-msg[data-grid-name="Job"]').length > 0){ 162 $('.tg-error-msg[data-grid-name="Job"]').html('Pas d\'offres d\'emplois pour le moment'); 163 } 164 // $('.application_button').on('click', function(){ $('.application_details').slideToggle(); }); 165 if(typeof $('.application_details') != 'undefined'){ 166 // $('.application_details').show(); 167 $('.application_details').hide(); 168 $(document).on('click', '.application_button', function(e){ 169 e.preventDefault(); 170 // $('.application_button').on('click', function(){ 171 $class.renderRecapatcha(); 172 $('.application_details').slideToggle(); 173 }); 174 if(typeof $('.application_details .gform_confirmation_wrapper') != 'undefined') 175 { 176 if(typeof $('.application_details .gform_confirmation_wrapper').offset() != 'undefined'){ 177 $('html, body').animate({ 178 scrollTop: $('.application_details .gform_confirmation_wrapper').offset().top - 200 179 }, 500); 180 } 181 } 182 $('.application_details form input[type="submit"]').prop('disabled', true); 183 184 $(document).bind('gform_post_render', function(){ 185 console.log('form submit'); 186 if($('.gform_wrapper').hasClass('gform_validation_error')){ 187 $('.application_details form input[type="submit"]').prop('disabled', true); 188 $class.renderRecapatcha(); 189 } 190 }); 191 192 } 193 setTimeout(() => { 194 $(window).resize(); 195 if($('.content-box').length > 0){ 196 console.log('content box = ' + $('.content-box').length);
197 $('.content-box').slideUp('slow'); 198 // $('.more').on('click', function(){ 199 // $(this).removeClass('more').addClass('less'); 200 // $('.content-box').slideDown('slow'); 201 // }); 202 // $('.less').on('click', function(){ 203 // $(this).removeClass('less').addClass('more'); 204 // $('.content-box').slideUp('slow'); 205 // }); 206 207 $('.toggle-content-box').click(function(){ 208 if($(this).hasClass('more')){ 209 $(this).removeClass('more').addClass('less'); 210 $('.content-box').slideDown('slow'); 211 } 212 else{ 213 $(this).removeClass('less').addClass('more'); 214 $('.content-box').slideUp('slow'); 215 } 216 217 }); 218 } 219 }, 1500); 220 221 $(window).on('scroll', function(){ 222 let $header = $('.elementor-location-header > .elementor-section-wrap > .elementor-section:nth-of-type(2)'); 223 if($(this).scrollTop() > 65){ 224 $header.addClass('fixed-header'); 225 } 226 else{ 227 $header.removeClass('fixed-header'); 228 } 229 }); 230 // var lazyLoadInstance = new LazyLoad({ 231 // elements_selector: ".image_wrapper" 232 // // ... more custom settings? 233 // }); 234 //Slider Blog Slider Override for Stories Homepage 235 // $('.blog_slider_override_ul').slick({ //, .the-grid-to-slide .tg-grid-slider > .tg-grid-holder 236 // infinite: true, 237 // // centerMode: true, 238 // // centerPadding: '17%', 239 // slidesToShow: 1, 240 // arrows: true, 241 // nextArrow: '<button type="button" class="slick-next arrow-green-next"></button>', 242 // prevArrow: '<button type="button" class="slick-prev arrow-green-prev"></button>', 243 // responsive: [ 244 // { 245 // breakpoint: 768, 246 // settings: { 247 // arrows: true, 248 // centerMode: true, 249 // centerPadding: '17%', 250 // slidesToShow: 1 251 // } 252 // }, 253 // // { 254 // // breakpoint: 480, 255 // // settings: { 256 // // arrows: true, 257 // // centerMode: true, 258 // // centerPadding: '40px', 259 // // slidesToShow: 1 260 // // } 261 // // } 262 // ] 263 // }); 264 } 265 renderRecapatcha(){ 266 let $this = this; 267 try{ 268 grecaptcha.render('g-recaptcha', { 269 sitekey: $('#g-recaptcha').data('sitekey'), 270 callback: $this.verifyResponseRecaptcha 271 }); 272 } 273 catch(error){} 274 } 275 verifyResponseRecaptcha(response){ 276 console.log('response captcha ' + response); 277 if(response != ''){ 278 $('.application_details form input[type="submit"]').prop('disabled', false); 279 } 280 else{ 281 console.log('deactive btn submit'); 282 $('.application_details form input[type="submit"]').prop('disabled', true); 283 } 284 } 285 loadPartenaireNew(){ 286 if($('.partenaires-grid').length > 0){ 287 setTimeout(function(){ 288 $('.partenaires-grid .tg-layout-masonry').hide(); 289 }, 1000); 290 291 $('.partenaires-grid input.tg-search').focusin(function() { 292 $('.partenaires-grid .tg-layout-masonry').css('opacity', 1).show().TG_Layout().css('left', 0); 293 $('.partenaire-the-tabs').hide(); 294 }); 295 $('.partenaires-grid input.tg-search').focusout(function() { 296 if($('.partenaires-grid input.tg-search').val() == ''){ 297 $('.partenaires-grid .tg-layout-masonry').hide(); 298 $('.partenaire-the-tabs').show(); 299 } 300 }); 301 $('.partenaires-grid .tg-layout-masonry').hover(function(){ 302 $('.partenaires-grid .tg-layout-masonry').show().TG_Layout().css('left', 0); 303 }); 304 $('.partenaires-grid .tg-search-clear').click(function(){ 305 $('.partenaires-grid .tg-layout-masonry').hide(); 306 $('.partenaire-the-tabs').show(); 307 }); 308 } 309 } 310 buttonActusEvents(){ 311 if($('body').hasClass('page-actualites-evenements')){ 312 $('.jig-filterButton').on('click', function(){ 313 var $data = $(this).data('filter-slug'); 314 console.log($data); 315 316 switch($data){ 317 case 'actualites': 318 $('.jig-filterButton[data-filter-slug="communiques"], .jig-filterButton[data-filter-slug="stories"]').removeClass('jig-filterButtonSelected'); 319 // console.log('communiques ' + $('.jig-filterButton[data-filter-slug="communiques"]').hasClass('jig-filterButtonSelected')); 320 // if($('.jig-filterButton[data-filter-slug="communiques"]').hasClass('jig-filterButtonSelected')){ 321 // $(this).removeClass('jig-filterButtonSelected'); 322 // } 323 // console.log('stories ' + $('.jig-filterButton[data-filter-slug="stories"]').hasClass('jig-filterButtonSelected')); 324 // if($('.jig-filterButton[data-filter-slug="stories"]').hasClass('jig-filterButtonSelected')){ 325 // $(this).removeClass('jig-filterButtonSelected'); 326 // } 327 // setTimeout(function(){ 328 $('.jig-filterButtons > .jig-filterButton:nth-of-type(n+5)').each(function(){ 329 $(this).click(); 330 }); 331 // }, 200); 332 333 break; 334 case 'communiques': 335 case 'stories': 336 $('.jig-filterButton').each(function(){ 337 $(this).removeClass('jig-filterButtonSelected'); 338 }); 339 break; 340 default: 341 342 break; 343 } 344 }); 345 } 346 } 347 loadHomeMobilePage(){ 348 if($('.home-mobile').length > 0){ 349 console.info('--home-mobile-load--'); 350 $.ajax({ 351 352 url: ajaxurl, 353 354 method: 'POST', 355 356 dataType: 'json', 357 358 data: { 359 360 action: 'render_home_mobile', 361 362 params: { 363 364 id: '' 365 366 } 367 368 }, 369 370 success: function(response){ 371 372 if(response && $('.home-mobile').length > 0){ 373 374 $('.home-mobile').html(Base64.decode(response.html)); 375 376 } 377 378 }, 379 380 error: function(){} 381 382 383 384 }); 385 } 386 } 387 loadHomeMap(){ 388 console.info('--loadmap--'); 389 $('#bdt-custom-offcanvas-carte, #bdt-custom-offcanvas-carte-2').on('click', function(){ 390 var $id = ""; 391 var $checkPanelSlide = setInterval(function(){ 392 if($('.bdt-offcanvas.bdt-open').length > 0){ 393 clearInterval($checkPanelSlide); 394 var $id = $('.bdt-offcanvas.bdt-open').attr('id'); 395 var $carteID = 0; 396 if($id == '#bdt-custom-offcanvas-carte'){ 397 $carteID = 1; 398 } 399 $.ajax({ 400 url: ajaxurl, 401 method: 'POST', 402 // dataType: 'html', 403 data: { 404 action: 'get_map_', 405 params: { 406 id: $carteID 407 } 408 }, 409 success: function(response){ 410 if(response && !$('.bdt-offcanvas.bdt-open[id="' + $id + '"] > div').hasClass('with-content')){ 411 $('.bdt-offcanvas.bdt-open[id="' + $id + '"] > div').addClass('with-content'); 412 $('.bdt-offcanvas.bdt-open[id="' + $id + '"] > div').html(response); 413 } 414 }, 415 error: function(){} 416 417 }); 418 } 419 }); 420 421 }); 422 } 423 loadActus(){ 424 if($('.bloc-actus').length > 0){ 425 console.info('--home-actus--'); 426 $.ajax({ 427 url: ajaxurl, 428 method: 'POST', 429 dataType: 'json', 430 data: { 431 action: 'get_actus_', 432 params: { 433 id: '' 434 } 435 }, 436 success: function(response){ 437 if(response && $('.bloc-actus').length > 0){ 438 $('.bloc-actus').html(response.html); 439 } 440 }, 441 error: function(){} 442 443 }); 444 } 445 } 446 loadSocialStream(){ 447 if($('.bloc-social-stream').length > 0){ 448 console.info('--social-stream--'); 449 $.ajax({ 450 url: ajaxurl, 451 method: 'POST', 452 dataType: 'json', 453 data: { 454 action: 'get_social_stream_', 455 params: { 456 id: '' 457 } 458 }, 459 success: function(response){ 460 if(response){ 461 $('.bloc-social-stream').html(response.html); 462 } 463 }, 464 error: function(){} 465 466 }); 467 } 468 } 469 loadSliderStories(){ 470 console.info('--slider-stories--' + storieid); 471 var $blocStories = $('.bloc-stories'); 472 var $this = this; 473 if($blocStories.length > 0){ 474 var $dataStories = $blocStories.data('params'); 475 476 $.ajax({ 477 url: ajaxurl, 478 method: 'POST', 479 dataType: 'json', 480 data: { 481 action: 'get_slider_stories_', 482 params: { 483 // count: '', 484 data: $dataStories, 485 poststorie: storieid 486 } 487 }, 488 success: function(response){ 489 console.log(response); 490 if(response && $blocStories.length > 0){ 491 // $('.bdt-offcanvas.bdt-open[id="' + $id + '"] > div').addClass('with-content'); 492 // $blocStories.html(decodeURIComponent(escape(response.html))); 493 $blocStories.html(response.html); 494 $this.renderJsSlideStories(); 495 } 496 }, 497 error: function(){} 498 499 }); 500 } 501 else if($('.blog_slider_override_ul').length > 0){ 502 $this.renderJsSlideStories(); 503 } 504 } 505 loadSliderPartenaire(){ 506 console.info('--slider-partenaire--'); 507 var $blocPartenaire = $('.bloc-partenaire'); 508 if($blocPartenaire.length > 0){ 509 var $dataPartenaire = $blocPartenaire.data('params'); 510 511 var $this = this; 512 $.ajax({ 513 url: ajaxurl, 514 method: 'POST', 515 dataType: 'json', 516 data: { 517 action: 'get_slider_partenaire_', 518 params: { 519 data: $dataPartenaire, 520 } 521 }, 522 success: function(response){ 523 if(response && $blocPartenaire.length > 0){ 524 // $('.bdt-offcanvas.bdt-open[id="' + $id + '"] > div').addClass('with-content'); 525 $blocPartenaire.html(response.html); 526 $this.renderJsSlideClients(); 527 } 528 }, 529 error: function(){} 530 531 }); 532 } 533 } 534 renderJsSlideStories(){ 535 console.log('--render-js-stories--'); 536 $('.blog_slider_override_ul').slick({ //, .the-grid-to-slide .tg-grid-slider > .tg-grid-holder 537 infinite: true, 538 centerMode: true, 539 centerPadding: '17%', 540 slidesToShow: 1, 541 arrows: true, 542 nextArrow: '<button type="button" class="slick-next arrow-green-next"></button>', 543 prevArrow: '<button type="button" class="slick-prev arrow-green-prev"></button>', 544 responsive: [ 545 { 546 breakpoint: 768, 547 settings: { 548 arrows: true, 549 centerMode: false, 550 // centerPadding: '17%', 551 slidesToShow: 1 552 } 553 }, 554 { 555 breakpoint: 480, 556 settings: { 557 arrows: true, 558 centerMode: false, 559 // centerPadding: '40px', 560 slidesToShow: 1 561 } 562 } 563 ] 564 }); 565 } 566 renderJsSlideClients(){ 567 var $params = $('.bloc-partenaire').data('params'); 568 569 var $sliderData = $params.split(','); 570 var $nbslides = 5; 571 var $arrow = true; 572 if($sliderData.length > 0){ 573 $sliderData.forEach((value, index) => { 574 var $value = value.split(':'); 575 if($value[0] == 'nbslides'){ 576 $nbslides = $value[1]; 577 } 578 if($value[0] == 'arrow'){ 579 $arrow = (($value[1] == 'true') ? true:false); 580 } 581 }); 582 } 583 584 console.log('nbslide: ' + $nbslides); 585 var swiperClients = new Swiper('.partenaires', { 586 slidesPerView: 1, 587 slidesPerColumn: 1, 588 spaceBetween: 5, 589 loop: true, 590 autoplay: true, 591 autoplaySpeed: 2000,
592 navigation: { 593 nextEl: ".swiper-button-next", 594 prevEl: ".swiper-button-prev", 595 }, 596 597 breakpoints: { 598 768: { 599 slidesPerView: 3, 600 spaceBetween: 30, 601 }, 602 968: { 603 slidesPerView: 5, 604 spaceBetween: 40, 605 }, 606 }, 607 }); 608 $('.clients').slick({ 609 centerMode: false, 610 slidesToShow: $nbslides, 611 centerPadding: '100px', 612 arrows: $arrow, 613 nextArrow: '<button type="button" class="slick-next arrow-green-next"></button>', 614 prevArrow: '<button type="button" class="slick-prev arrow-green-prev"></button>', 615 infinite: true, 616 responsive: [ 617 { 618 breakpoint: 768, 619 settings: { 620 arrows: true, 621 centerMode: false, 622 centerPadding: '40px', 623 slidesToShow: 4 624 } 625 }, 626 { 627 breakpoint: 480, 628 settings: { 629 arrows: false, 630 centerMode: false, 631 centerPadding: '40px', 632 slidesToShow: 3 633 } 634 } 635 ] 636 }); 637 } 638 clickContactParcours() 639 { 640 $('.form-parcours .tabs1 .gfield_radio > li:last-child').on('click', function(){ 641 var $href = $(this).find('input').attr('value'); 642 // window.location.href = $href; 643 window.open($href, '_blank'); 644 }); 645 } 646 removeBreadcrumbsDuplication(){ 647 648 if($('#breadcrumbs').length == 1){ 649 console.log('-- remove breadcrumbs --'); 650 // $('#breadcrumbs')[0].remove(); 651 } 652 } 653 renderJsAmorcage(){ 654 if($('.code-postal').length > 0){ 655 console.log('--process amorcage--'); 656 $('.code-postal input').on('change', function() { 657 const val = $(this).val(); 658 if(val){ 659 $('.email-at select > option').each(function(){ 660 var optionval = $(this).val(); 661 if(optionval != ''){ 662 var regexpr = "^" + optionval; 663 console.log('find ' + regexpr); 664 var regtest = new RegExp(regexpr); 665 if(regtest.test(val)){ 666 jQuery('.email-at select > option').removeAttr('selected'); 667 jQuery('.email-ref select > option').removeAttr('selected'); 668 jQuery('.email-at select > option[value="' + optionval + '"]').attr('selected', 'selected'); 669 jQuery('.email-ref select > option[value="' + optionval + '"]').attr('selected', 'selected'); 670 } 671 } 672 }); 673 } 674 else{ 675 jQuery('.email-at select > option').removeAttr('selected'); 676 jQuery('.email-ref select > option').removeAttr('selected'); 677 jQuery('.email-at select > option:first-child').attr('selected', 'selected'); 678 jQuery('.email-ref select > option:first-child').attr('selected', 'selected'); 679 } 680 // const reg = new RegExp("^01"); 681 // if(reg.test(val)){ 682 // jQuery('.email-at select > option').removeAttr('selected'); 683 // jQuery('.email-at select > option[value="01"]').attr('selected', 'selected'); 684 // } 685 }); 686 } 687 } 688 }; 689 690 $(window).on('load', function(){ 691 console.log('--page-loaded--'); 692 let FA = new ProcessFAHandler(); 693 if($('body').hasClass('page-id-13164')){ 694 $('.ssba_print').removeAttr('onclick'); 695 $('.ssba_print').attr('href', 'https://www.franceactive.org/wp-content/uploads/2018/03/OnePager-FondsAmorcage-national.pdf'); 696 $('.ssba_print').attr('target', '_blank'); 697 } 698 }); 699 700 701 /** Fin */ 702 $(document).ready(function(){ 703 704 705 706 707 708 709 tabsGravityParcours(); 710 711 $('.category a, a[rel="category"]').click(function(e){ 712 713 e.preventDefault(); 714 715 }); 716 717 $('.jig-caption-description').each(function(){ 718 719 $(this).html($(this).html().replace("Partager sur", "")); 720 721 }); 722 723 724 725 // $('.application_button').on('click', function(){ $('.application_details').slideToggle(); }); 726 727 btnShareLightbox(); 728 729 730 731 filterJobLocation(); 732 733 734 735 736 $('.job-grid .tg-dropdown-list > li').click(function(){ 737 738 console.log('filter job'); 739 740 $('.job-grid .tg-dropdown-list > li.tg-filter-active').each(function(){ 741 742 $(this).removeClass('tg-filter-active'); 743 744 }); 745 746 var $this = $(this); 747 748 setTimeout(function(){ 749 750 $this.addClass('tg-filter-active'); 751 752 }, 200); 753 754 755 756 }); 757 758 759 760 dropDownMenuFooter(); 761 762 function dropDownMenuFooter(){ 763 764 // $(window).on('resize', function(){ 765 766 $('.block-footer-fa .footer-menu-double li.menu-item-has-children').find('.control').remove(); 767 768 769 770 if($(window).width() < 960){ 771 772 $('.block-footer-fa .footer-menu-double li.menu-item-has-children > .sub-menu').each(function(){ 773 774 $(this).slideUp('slow'); 775 776 }); 777 778 $('.block-footer-fa .footer-menu-double li.menu-item-has-children').prepend('<span class="control show">+</span>'); 779 780 } 781 782 else{ 783 784 $('.block-footer-fa .footer-menu-double ul.menu li.menu-item-has-children').prepend('<span class="control show">+</span>'); 785 786 } 787 788 // }); 789 790 791 792 $('.block-footer-fa .footer-menu-double li.menu-item-has-children > .sub-menu').each(function(){ 793 794 $(this).slideUp('slow'); 795 796 }); 797 798 $('.block-footer-fa .footer-menu-double ul.menu > li > a').click(function(e){ 799 800 e.preventDefault(); 801 802 $(this).parents('li.menu-item-has-children').first().find('.sub-menu').first().slideToggle('slow', function(){ 803 804 $(this).parents('li.menu-item-has-children').first().find('.control').first().removeClass('show').addClass('less').html('-'); 805 806 }); 807 808 }); 809 810 $('.block-footer-fa .footer-menu-double ul.menu > li > .sub-menu > li').hover(function(){ 811 812 $(this).find('.sub-menu').first().slideToggle('slow'); 813 814 }); 815 816 $('.block-footer-fa .footer-menu-double li.menu-item-has-children > .show').on('click', function(){ 817 818 $(this).parents('li.menu-item-has-children').first().find('.sub-menu').first().slideDown('slow', function(){ 819 820 $(this).parents('li.menu-item-has-children').first().find('.control').first().removeClass('show').addClass('less').html('-'); 821 822 }); 823 824 }); 825 826 $('.block-footer-fa .footer-menu-double li.menu-item-has-children > .less').on('click', function(){ 827 828 $(this).parents('li.menu-item-has-children').first().find('.sub-menu').first().slideUp('slow', function(){ 829 830 $(this).parents('li.menu-item-has-children').first().find('.control').first().removeClass('less').addClass('show').html('+'); 831 832 }); 833 834 }); 835 836 837 838 } 839 840 var iterateCheckBrowser = 0; 841 842 var checkBrowser = setInterval(function(){ 843 844 if($('.adv_browser_check_msg').css('display') == 'block'){ 845 846 // alert('miseo'); 847 848 849 850 var contentBrowserCheck = $('.advanced-browser-check')[0].outerHTML; 851 852 $('.advanced-browser-check').remove(); 853 854 $('body').prepend(contentBrowserCheck); 855 856 857 858 clearInterval(checkBrowser); 859 860 } 861 862 else if(iterateCheckBrowser > 2){ 863 864 clearInterval(checkBrowser); 865 866 } 867 868 iterateCheckBrowser++; 869 870 }, 2000); 871 872 873
874 $('.list-recap table.gfield_list tbody > tr > td:first-child').each(function(){ 875 876 var thumbsUrl = $(this).html(); 877 878 var imgHtml = '<img src="' + thumbsUrl + '" alt="img" style="height:300px!important" />'; 879 880 $(this).html(imgHtml); 881 882 }); 883 884 885 886 $('li.listing-publication table.gfield_list tbody > tr.gfield_list_group > td:first-child input').each(function(){ 887 888 var thumbsUrl = $(this).val(); 889 890 var imgHtml = '<img src="' + thumbsUrl + '" alt="img" />'; 891 892 $(this).parents('td').append(imgHtml); 893 894 }); 895 896 $('li.listing-publication table.gfield_list tbody > tr.gfield_list_group > td:nth-of-type(2) input').each(function(){ 897 898 var titlePublication = $(this).val(); 899 900 titlePublication = '<h5>' + titlePublication + '</h5>'; 901 902 $(this).parents('td').append(titlePublication); 903 904 }); 905 906 907 908 $('.partenaires-grid .tg-grid-holder > article').each(function(){ 909 910 var contentExcerpt = $(this).find('.tg-item-excerpt'); 911 912 if(contentExcerpt.length > 0 && contentExcerpt.height() > 160){ 913 914 contentExcerpt.css({ 915 916 height: '190px', 917 918 overflow: 'hidden' 919 920 }).parents('div').first().append('<span class="more">[lire plus]</span>'); 921 922 923 924 } 925 926 927 928 }); 929 930 $('.partenaires-grid .tg-grid-holder article .more').on('click', function(){ 931 932 //doExcerptGrid($(this) , true); 933 934 $(this).parents('div').first().find('.tg-item-excerpt').css({ 935 936 height: '100%' 937 938 }); 939 940 $(this).parents('div').first().find('.more').removeClass('more').addClass('less').html('[lire moins]'); 941 942 $('.partenaires-grid .tg-grid-holder').TG_Layout(); 943 944 945 946 }); 947 948 $('.partenaires-grid .tg-grid-holder article .less').on('click', function(){ 949 950 /*doExcerptGrid($(this) , false); 951 952 $('.partenaires-grid .tg-grid-holder').TG_Layout();*/ 953 954 $(this).parents('div').first().find('.tg-item-excerpt').css({ 955 956 height: '190px' 957 958 }); 959 960 $(this).parents('div').first().find('.less').removeClass('less').addClass('more').html('[lire plus]'); 961 962 $('.partenaires-grid .tg-grid-holder').TG_Layout(); 963 964 }); 965 966 967 968 969 970 971 972 if($('.job-apply-btn').length > 0){ 973 974 var btnApply = $('.job-apply-btn .job_application.application').html(); 975 976 $('.job-apply-btn > div.wpb_column:nth-of-type(2) .wpb_wrapper').html(btnApply); 977 978 $('.job-apply-btn .job_application.application').remove(); 979 980 } 981 982 983 984 if($('.btn-download-files').length > 0){ 985 986 $('.btn-download-files button, .btn-download-files').click(function(){ 987 if($('.wpdm-download-link').length > 0){ 988 $('.wpdm-download-link').click(); 989 } 990 else if(typeof download_data != 'undefined' && download_data.url != ''){ 991 window.location.href = download_data.url; 992 } 993 }); 994 995 } 996 997 //Meuro 998 999 $('.ico-fa-currency .ts-counter-content .ts-counter-value').css('float', 'left').after('<span class="meuro green-color">m€</span>'); 1000 1001 1002 1003 //Change classe title dans "ou en etes vous" 1004 1005 1006 $('#mobile-layout .slide-actus').slick({ 1007 1008 rtl: false, 1009 1010 dots: false, 1011 1012 infinite: true, 1013 1014 centerMode: false, 1015 1016 slidesToShow: 1, 1017 1018 slidesToScroll: 1, 1019 1020 arrows: false, 1021 1022 }); 1023 1024 $('.cq-tabmenu > li:not(.isclick)').click(function(){ 1025 1026 $(this).addClass('isclick'); 1027 1028 1029 $('#mobile-layout .slide-actus').slick('refresh', true); 1030 1031 }); 1032 1033 1034 1035 //Slider Homepage Partenaire 1036 // slick_slides_rpbt(4); 1037 $(window).on('load resize', function(){ 1038 if($(this).width() > 768){ 1039 slick_slides_rpbt(4); 1040 } 1041 else{ 1042 slick_slides_rpbt(1); 1043 } 1044 }); 1045 function slick_slides_rpbt($nb_slide){ 1046 if(typeof $('.rpbt_shortcode').slick == 'function'){ 1047 $('.rpbt_shortcode').filter('.slick-initialized').slick('unslick'); 1048 $('.rpbt_shortcode').slick({ 1049 1050 centerMode: false, 1051 1052 slidesToShow: $nb_slide, 1053 1054 centerPadding: '100px', 1055 1056 arrows: true, 1057 1058 nextArrow: '<button type="button" class="slick-next arrow-green-next"></button>', 1059 1060 prevArrow: '<button type="button" class="slick-prev arrow-green-prev"></button>', 1061 1062 infinite: true, 1063 1064 autoplay: true, 1065 1066 autoplaySpeed: 2000 1067 1068 }); 1069 } 1070 } 1071 /* 1072 $('.rpbt_shortcode').slick({ 1073 1074 centerMode: false, 1075 1076 slidesToShow: 4, 1077 1078 centerPadding: '100px', 1079 1080 arrows: true, 1081 1082 nextArrow: '<button type="button" class="slick-next arrow-green-next"></button>', 1083 1084 prevArrow: '<button type="button" class="slick-prev arrow-green-prev"></button>', 1085 1086 infinite: false, 1087 1088 1089 responsive: [ 1090 1091 { 1092 1093 breakpointS: 768, 1094 1095 settings: { 1096 1097 arrows: true, 1098 1099 centerMode: false, 1100 1101 centerPadding: '40px', 1102 1103 slidesToShow: 1 1104 1105 } 1106 1107 }, 1108 1109 { 1110 1111 breakpoint: 480, 1112 1113 settings: { 1114
1115 arrows: false, 1116 1117 centerMode: false, 1118 1119 centerPadding: '40px', 1120 1121 slidesToShow: 1 1122 1123 } 1124 1125 } 1126 1127 ] 1128 1129 });*/ 1130 1131 var checkGallery = setInterval(checkTSGallery, 2000); 1132 1133 function checkTSGallery(){ 1134 1135 1136 if($('.ts-gallery-to-slick .nch-lb-grid').length > 0){ 1137 1138 1139 clearInterval(checkGallery); 1140 1141 $('.ts-gallery-to-slick .nch-lb-grid').slick({ 1142 1143 infinite: true, 1144 1145 centerMode: true, 1146 1147 centerPadding: '17%', 1148 1149 slidesToShow: 1, 1150 1151 arrows: true, 1152 1153 nextArrow: '<button type="button" class="slick-next arrow-green-next"></button>', 1154 1155 prevArrow: '<button type="button" class="slick-prev arrow-green-prev"></button>', 1156 1157 responsive: [ 1158 1159 { 1160 1161 breakpoint: 768, 1162 1163 settings: { 1164 1165 arrows: true, 1166 1167 centerMode: true, 1168 1169 centerPadding: '40px', 1170 1171 slidesToShow: 1 1172 1173 } 1174 1175 }, 1176 1177 { 1178 1179 breakpoint: 480, 1180 1181 settings: { 1182 1183 arrows: true, 1184 1185 centerMode: true, 1186 1187 centerPadding: '40px', 1188 1189 slidesToShow: 1 1190 1191 } 1192 1193 } 1194 1195 ] 1196 1197 }); 1198 1199 } 1200 1201 else{ 1202 1203 clearInterval(checkGallery); 1204 1205 } 1206 1207 } 1208 1209 1210 1211 //The Grid Slider 1 show other blur 1212 1213 $('.the-grid-to-slide .tg-grid-slider > .tg-grid-holder').slick({ 1214 1215 slidesToShow: 1, 1216 1217 centerMode: true, 1218 1219 centerPadding: '20%', 1220 1221 nextArrow: '<button type="button" class="slick-next arrow-green-next"></button>', 1222 1223 prevArrow: '<button type="button" class="slick-prev arrow-green-prev"></button>' 1224 1225 }); 1226 1227 1228 1229 var nbSlide, milieuSlide, milieuDebut, milieuFin; 1230 1231 $('.the-grid-interne-to-slide .tg-grid-slider > .tg-grid-holder').on('init', function(event, slick){ 1232 1233 1234 1235 nbSlide = $('.ou-en-etes-vous .slick-dots > li').length; 1236 1237 milieuSlide = Math.ceil(nbSlide / 2); 1238 1239 milieuDebut = Math.ceil((milieuSlide / 2) / 2); 1240 1241 milieuFin = milieuSlide + Math.ceil (((nbSlide - milieuSlide) / 2) / 2); 1242 1243 1244 1245 1246 }); 1247 1248 $('.the-grid-interne-to-slide .tg-grid-slider > .tg-grid-holder').on('beforeChange', function(event, slick, currentSlide, nextSlide){ 1249 1250 $('.three_dots > li').each(function(){ 1251 1252 $(this).removeClass('active'); 1253 1254 }); 1255 1256 if( nextSlide <= milieuDebut ) { 1257 1258 $('.three_dots > li.first-dots').addClass('active'); 1259 1260 } 1261 1262 else if( nextSlide > milieuDebut && nextSlide < milieuFin ) 1263 1264 { 1265 1266 $('.three_dots > li.middle-dots').addClass('active'); 1267 1268 } 1269 1270 else if ( nextSlide >= milieuFin && nextSlide < nbSlide ){ 1271 1272 $('.three_dots > li.last-dots').addClass('active'); 1273 1274 } 1275 1276 }); 1277 1278 1279 1280 //The Grid Interne 3 Show split First and Last 1281 1282 var gridInterneSlick = $('.the-grid-interne-to-slide .tg-grid-slider > .tg-grid-holder'); 1283 1284 1285 gridInterneSlick.slick({ 1286 1287 dots: true, 1288 1289 infinite: true, 1290 1291 centerMode: true, 1292 1293 centerPadding: '12%', 1294 1295 slidesToShow: 3, 1296 1297 slidesToScroll: 1, 1298 1299 speed: 500, 1300 1301 nextArrow: '<button type="button" class="slick-next arrow-green-next"></button>', 1302 1303 prevArrow: '<button type="button" class="slick-prev arrow-green-prev"></button>', 1304 1305 responsive: [{ 1306 1307 breakpoint: 992, 1308 1309 settings: { 1310 1311 slidesToShow: 1 1312 1313 } 1314 1315 }] 1316 1317 }); 1318 1319 1320 1321 if(gridInterneSlick.parents('.the-grid-interne-to-slide').hasClass('ou-en-etes-vous')){ 1322 1323 gridInterneSlick.slick('unslick'); 1324 1325 gridInterneSlick.slick({ 1326 1327 dots: true, 1328 1329 infinite: false, 1330 1331 centerMode: false, 1332 1333 slidesToShow: 3, 1334 1335 slidesToScroll: 1, 1336 1337 speed: 500, 1338 1339 nextArrow: '<button type="button" class="slick-next arrow-green-next"></button>', 1340 1341 prevArrow: '<button type="button" class="slick-prev arrow-green-prev"></button>', 1342 1343 responsive: [{ 1344 1345 breakpoint: 992, 1346 1347 settings: { 1348 1349 slidesToShow: 1 1350 1351 } 1352 1353 }] 1354 1355 }); 1356 1357 1358 1359 $('.the-grid-interne-to-slide .slick-list.draggable').css('padding', '0 11%'); 1360 1361 //placé la grille au milieu 1362 1363 $('.the-grid-interne-to-slide .tg-grid-slider > .tg-grid-holder').slick('slickGoTo' , milieuDebut); 1364 1365 } 1366 1367 1368 1369 $('.three_dots > li.first-dots').click(function(){ 1370 1371 $('.the-grid-interne-to-slide .tg-grid-slider > .tg-grid-holder').slick('slickGoTo' , 0); 1372 1373 }); 1374 1375 $('.three_dots > li.middle-dots').click(function(){ 1376 1377 $('.the-grid-interne-to-slide .tg-grid-slider > .tg-grid-holder').slick('slickGoTo' , milieuDebut + 1); 1378 1379 }); 1380 1381 $('.three_dots > li.last-dots').click(function(){ 1382 1383 $('.the-grid-interne-to-slide .tg-grid-slider > .tg-grid-holder').slick('slickGoTo' , milieuFin); 1384 1385 }); 1386 1387 1388 1389 //Breadcrumb capitalize First Letter 1390 1391 $('#Subheader ul.breadcrumbs > li').each(function(){ 1392 1393 $(this).find('a').text(capitalizeFirstLetter($(this).find('a').text())); 1394 1395 }); 1396 1397 1398 1399 // Formulaire telechargement 1400 1401 1402 $('.section-file-download .gform_wrapper').hide(); 1403 1404 1405 $('.section-file-download .vc_btn3-right .vc_btn3-color-vista-blue').click(function(){ 1406 1407 $('.section-file-download .gform_wrapper').toggle(500); 1408 1409 }); 1410 1411 $('.section-file-download .gform_body li.gf_readonly:first-child input').val( 1412
1413 $('.section-file-download .vc_row:nth-child(2) .vc_col-sm-8 .wpb_wrapper > h2:first-child').text()); 1414 1415 $('.section-file-download .gform_body li.gf_readonly input').attr("readonly","readonly"); 1416 1417 1418 1419 $('.tg-grid-holder .slick-track article').each(function(){ 1420 1421 if ($(this).find('i').length > 0) { 1422 1423 1424 1425 } else { 1426 1427 $("<i class=\"tg-icon-arrow-next tg-element-1\" style=\"vertical-align: middle;\"></i>").insertAfter($(this).find('.tg-item-title')); 1428 1429 $(this).find('i').append($(this).find('.tg-item-content-holder > .tg-element-absolute')); 1430 1431 } 1432 1433 }); 1434 1435 $('.ou-en-etes-vous .tg-caracas_vous .tg-center-inner').each(function(){ 1436 1437 $("<i class=\"tg-icon-arrow-next\" style=\"vertical-align: middle;color: #000000;font-size: 13px;line-height: 40px;\"></i>").insertAfter($(this).find('.tg-element-1')); 1438 1439 }); 1440 1441 1442 1443 }); 1444 1445 1446 1447 function doExcerptGrid(button , down){ 1448 1449 var excerptLess = button.data('excerpt-less'); 1450 1451 var excerptMore = button.data('excerpt-more'); 1452 1453 var txt = ''; 1454 1455 if(down){ 1456 1457 txt = excerptLess + excerptMore + ' <span class="less" style="color: rgb(0, 207, 155)!important" data-excerpt-less="' + excerptLess + '" data-excerpt-more="' + excerptMore + '">[Lire moins]</span> '; 1458 1459 button.parents('article').css('z-index', 1000); 1460 1461 } 1462 1463 else{ 1464 1465 txt = excerptLess + ' <span class="more" style="color: rgb(0, 207, 155)!important" data-excerpt-less="' + excerptLess + '" data-excerpt-more="' + excerptMore + '">[Lire plus]</span> '; 1466 1467 } 1468 1469 button.parents('.tg-item-excerpt').html(txt); 1470 1471 } 1472 1473 1474 1475 function capitalizeFirstLetter(string) { 1476 1477 return string.charAt(0).toUpperCase() + string.slice(1); 1478 1479 } 1480 1481 function btnShareLightbox(){ 1482 1483 $(document).on('click', '.btn-sharing .hover_box, .elementor-btn-sharing, img[src*="export-blanc.png"]', function(){ 1484 1485 $('.ssba.ssbp-wrap').show('500'); 1486 1487 }); 1488 1489 $('.ssba.ssbp-wrap > div').prepend('<span class="close">x</span>'); 1490 1491 $('.ssba.ssbp-wrap > div .close').click(function(){ 1492 1493 $('.ssba.ssbp-wrap').hide('500'); 1494 1495 }); 1496 1497 } 1498 1499 1500 1501 function filterJobLocation(){ 1502 1503 1504 1505 if(typeof $('.job-skin') != 'undefined' && $('.job-skin').length > 0){ 1506 1507 1508 1509 getRegionJob(); 1510 1511
1512 $('.job-skin span.joblocation').each(function(){ 1513 1514 $(this).parents('article').addClass($(this).data('joblocation')); 1515 1516 1517 }); 1518 1519 if($(window).width() < 772){ 1520 1521 $('.job-grid .tg-dropdown-holder').click(function(){ 1522 1523 var $dropdown = $(this).find('select'); 1524 1525 if($dropdown.hasClass('active')){ 1526 1527 $dropdown.removeClass('active'); 1528 1529 } 1530 1531 else{ 1532 1533 $dropdown.addClass('active'); 1534 1535 } 1536 1537 }); 1538 1539 } 1540 1541 } 1542 1543 } 1544 1545 1546 1547 function getRegionJob(){ 1548 1549 $.ajax({ 1550 1551 type: 'POST', 1552 1553 url: ajaxurl, 1554 1555 dataType: 'json', 1556 1557 async: false, 1558 1559 data: { 1560 1561 'action': 'get_regions_jobs', 1562 1563 'param': 'id' 1564 1565 }, 1566 1567 success: function(ret){ 1568 1569 //console.log(ret.length); 1570 1571 console.log($('.job-grid .tg-grid-area-top1 > div:first-child .tg-dropdown-list > .tg-filter').first()[0]); 1572 1573 if(typeof $('.job-grid .tg-grid-area-top1 > div:first-child .tg-dropdown-list > .tg-filter').first()[0] != 'undefined'){ 1574 1575 $li = $('.job-grid .tg-grid-area-top1 > div:first-child .tg-dropdown-list > .tg-filter').first()[0].outerHTML; 1576 1577 1578 1579 $.each(ret[0], function(index, value){ 1580 1581 if($(window).width() < 772){ 1582 1583 $li += '<option class="tg-dropdown-item tg-filter custom-filter" data-taxo="job_listing_type" data-filter=".' + index + '" style="display: block"><span class="tg-filter-name">' + value + '</span></option>'; 1584 1585 } 1586 1587 else{ 1588 1589 $li += '<li class="tg-dropdown-item tg-filter custom-filter" data-taxo="job_listing_type" data-filter=".' + index + '" style="display: block"><span class="tg-filter-name">' + value + '</span></li>'; 1590 1591 } 1592 1593 1594 1595 }); 1596 1597 $('.job-grid .tg-grid-area-top1 > div:first-child .tg-dropdown-list').html('').append($li); 1598 1599 } 1600 1601 }, 1602 1603 error: function(){} 1604 1605 }); 1606 1607 } 1608 1609 1610 1611 function tabsGravityParcours(){ 1612 1613 if($('.gf_step_active').hasClass('gf_step_last')){ 1614 1615 $('body').addClass('gf_final_step'); 1616 1617 } 1618 1619 $('.tabs1 .gfield_radio > li').each(function(){ 1620 1621 $(this).removeClass('active'); 1622 1623 if($(this).find('input[type="radio"]').is(":checked")){ 1624 1625 $(this).addClass('active'); 1626 1627 } 1628 1629 }); 1630 1631 $('.tabs1 .gfield_radio > li').click(function(){ 1632 1633 if($(this).find('input[type="radio"]').is(":checked")){ 1634 1635 $('.tabs1 .gfield_radio > li').each(function(){ $(this).removeClass('active'); }); 1636 1637 $(this).addClass('active'); 1638 1639 } 1640 1641 }); 1642 1643 1644 1645 $('.close-section').click(function(){ 1646 1647 $('.section-to-hide').hide('slow'); 1648 1649 }); 1650 1651 1652 1653 $('.gf-deselect-auto .gfield_checkbox > li:not(:last-child)').on('click', function(){ 1654 1655 console.log('click first'); 1656 1657 $parents = $(this).parents('.gfield_checkbox'); 1658 1659 $parents.find('li').last().find('input').removeAttr('checked'); 1660 1661 }); 1662 1663 $('.gf-deselect-auto .gfield_checkbox > li:last-child').on('click', function(){ 1664 1665 console.log('click last'); 1666 1667 $parents = $(this).parents('.gfield_checkbox').first(); 1668 1669 1670 1671 $parents.find('li').each(function(index){ 1672 1673 console.log(index + '<' + $parents.find('li').length); 1674 1675 if($(this).find('input').attr('checked') == 'checked' && (index + 1) < $parents.find('li').length){ 1676 1677 console.log('index ' + index + ' name ' + $(this).find('input').attr('name')); 1678 1679 $(this).find('input').removeAttr('checked'); 1680 1681 } 1682 1683 }); 1684 1685 }); 1686 1687 $('.form-quiz input[type="radio"]').each(function(){ 1688 1689 $(this).removeAttr('checked'); 1690 1691 }); 1692 1693 1694 dissocRurPriLast(); 1695 1696 tabsToSelect(); 1697 1698 } 1699 1700 function clickRurPriRet(){ 1701 1702 $length = jQuery('.gf-rural-prio .gfield_checkbox > li').length; 1703 1704 console.log('length ' + $length); 1705 1706 dissocRurPri($length - 1, true); 1707 1708 dissocRurPri($length - 2, false); 1709 1710 } 1711 1712 function dissocRurPri($index, $ret){ 1713 1714 1715 1716 jQuery('.gf-rural-prio .gfield_checkbox > li:nth-of-type(' + $index + ')').on('click', function(){ 1717 1718 $parents = jQuery(this).parents('.gfield_checkbox'); 1719 1720 $parents.find('li').each(function(index){ 1721 1722 $increment = $ret ? ($index - 2) : $index; 1723 1724 if(index == $increment && jQuery(this).find('input').attr('checked') == 'checked'){ 1725 1726 console.log('prio rur ' + $increment); 1727 1728 jQuery(this).find('input').removeAttr('checked'); 1729 1730 } 1731 1732 }); 1733 1734 }); 1735 1736 } 1737 1738 1739 1740 function dissocRurPriLast(){ 1741 1742 jQuery('.gf-rural-prio .gfield_checkbox > li').on('click', function(){ 1743 1744 $parents = jQuery(this).parents('.gfield_checkbox'); 1745 1746 $length = $parents.find('li').length; 1747 1748 $myindex = jQuery(this).index(); 1749 1750 if(($myindex + 1) == $length - 1){ 1751 1752 $parents.find('li:nth-of-type(' + ($length - 2) + ') input').removeAttr('checked'); 1753 1754 } 1755 1756 else if (($myindex + 1) == $length - 2){ 1757 1758 $parents.find('li:nth-of-type(' + ($length - 1) + ') input').removeAttr('checked'); 1759 1760 } 1761 1762 }); 1763 1764 } 1765 1766 1767 1768 function tabsToSelect(){ 1769 1770 if(jQuery(window).width() < 772){ 1771 1772 $selectOptionsHtml = ''; 1773 1774 jQuery('.tabs1 ul > li').each(function(index){ 1775 1776 $label = jQuery(this).find('label').html(); 1777 1778 1779 1780 $selectOptionsHtml += '<option value="' + index + '">' + $label.replace('<br>', ' ') + '</option>'; 1781 1782 }); 1783 1784 $selectHtml = '<select id="choiceTabs">' + $selectOptionsHtml + '</select>'; 1785 1786 1787 1788 1789 1790 jQuery('.tabs1').append($selectHtml); 1791 1792 1793 1794 jQuery('.round-tab-item .bdt-tab > .bdt-tabs-item').each(function(index){ 1795 1796 $label = jQuery(this).find('.bdt-tab-text').html(); 1797 1798 $selectOptionsHtml += '<option value="' + index + '">' + $label.replace('<br>', ' ') + '</option>'; 1799 1800 }); 1801 1802 $selectHtml = '<select id="choiceTabs">' + $selectOptionsHtml + '</select>'; 1803 1804 1805 1806 jQuery('.round-tab-item .bdt-tabs > div:first-child').append($selectHtml); 1807 1808 1809 1810 1811 1812 jQuery('#choiceTabs').on('change', function(){ 1813 1814 console.log('choix click = ' + jQuery(this).val()); 1815
1816 $valueChoice = parseInt(jQuery(this).val()) + 1; 1817 1818 jQuery('.tabs1 ul > li:nth-of-type(' + $valueChoice + ') input').click(); 1819 1820 jQuery('.tabs1 ul > li:nth-of-type(' + $valueChoice + ') input').click(); 1821 1822 jQuery('.round-tab-item .bdt-tabs .bdt-switcher > div').each(function(){ 1823 1824 jQuery(this).removeClass('bdt-active'); 1825 1826 }); 1827 1828 jQuery('.round-tab-item .bdt-tabs .bdt-switcher > div:nth-of-type(' + $valueChoice + ')').addClass('bdt-active'); 1829 1830 }); 1831 1832 1833 } 1834 1835 } 1836 1837 1838 1839 1840})(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.