1jQuery(document).ready(function ($) { 2 console.log('people.js ready'); 3 4 ////////////////////////// 5 // People Adjust Height // 6 ////////////////////////// 7 function people_adjust_height() { 8 $(".people-container .people-list").each(function(){ 9 10 11 12 let people_count = $(this).find(".people-list_item").length; 13 let people_counter = 1; 14 15 let people_cols = 3 16 if ($(window).width()<=1366) people_cols = 2 17 if ($(window).width()<=768) people_cols = 1 18 19 let people_rows = Math.ceil(people_count/people_cols); 20 21 $(this).find('.people-list_item .item--details').height("initial"); 22 23 24 25 // console.log("ppl_count = "+people_count) 26 // console.log(people_rows +" rows / "+people_cols+" cols") 27 28 for (a=0;a<people_rows;a++) { 29 30 maxHeight = -1; 31 32 for (b=0;b<people_cols;b++) { 33 //console.log("current element("+(people_counter+b)+") height: "+$(this).find('.people-list_item:nth-child('+(people_counter+b)+') .item--details').height()) 34 if ($(this).find('.people-list_item:nth-child('+(people_counter+b)+') .item--details').height()>maxHeight) 35 maxHeight = $(this).find('.people-list_item:nth-child('+(people_counter+b)+') .item--details').height() 36 } 37 38 // console.log("==> FINAL MAXH = "+maxHeight) 39 40 41 for (b=0;b<people_cols;b++) { 42 43 // console.log("row "+a+" / element "+people_counter+" / maxheight "+maxHeight) 44 $(this).find('.people-list_item:nth-child('+people_counter+') .item--details').height(maxHeight); 45 people_counter++; 46 if (people_counter>=people_count+1) {break} 47 } 48 49 // console.log("------------------------") 50 51 52 53 54 } 55 56 57 58 }) 59 } 60 61 people_adjust_height() 62 63 64 /* 65 ======================== 66 TEAM READ MORE 67 ======================== 68 */ 69 $("body").on("click", ".people-container:not(.partner) .moreBtn", 70 function(){ 71 if($('html[lang=fr-FR]').length){ 72 $(this).text("Fermer"); 73 }else{ 74 $(this).text("Close"); 75 } 76 77 $(this).parent().parent().find(".moreDetails").slideDown(250); 78 $(this).removeClass("moreBtn"); 79 $(this).addClass("lessBtn"); 80 } 81 ) 82 $("body").on("click", ".people-container:not(.partner) .lessBtn", 83 function(){ 84 $(this).text("See Bio"); 85 $(this).parent().parent().find(".moreDetails").slideUp(250); 86 $(this).removeClass("lessBtn"); 87 $(this).addClass("moreBtn"); 88 } 89 ) 90 91 $("body").on("click", ".people-container.partner .moreBtn", 92 function(){ 93 $(this).text("Close"); 94 $(this).parent().parent().find(".moreDetails").slideDown(250); 95 $(this).removeClass("moreBtn"); 96 $(this).addClass("lessBtn"); 97 } 98 ) 99 $("body").on("click", ".people-container.partner .lessBtn", 100 function(){ 101 $(this).text("Learn More"); 102 $(this).parent().parent().find(".moreDetails").slideUp(250); 103 $(this).removeClass("lessBtn"); 104 $(this).addClass("moreBtn"); 105 } 106 ) 107 108// WINDOW RESIZE // 109$(window).on( "resize", function() { 110 people_adjust_height(); 111}); 112 113// WINDOW SCROLL // 114$(window).on( "scroll", function() { 115 116}); 117 118});
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.