PageSourceSearch

https://cmief.ca/wp-content/themes/adnetframework/extensions/blocks/block-team-list/block-team-list.js

js cmief.ca collected 2026-10-04 02:40:12 UTC 985 bytes, 36 lines download raw bytes

1// Vanilla JS
2// On Doco Load
3const teamMembers = document.querySelectorAll(".team-member");
4
5teamMembers.forEach(function (teamMember) {
6  teamMember.addEventListener("click", function () {
7    const isOpened = teamMember.getAttribute("aria-expanded") === "true";
8    if (isOpened) {
9      closeBio(teamMember);
10    } else {
11      openBio(teamMember);
12    }
13  });
14});
15
16function openBio(e) {
17  const memberInfo = e.querySelector(".member-info");
18  const bio = e.querySelector(".bio");
19
20  teamMembers.forEach(function (teamMember) {
21    closeBio(teamMember);
22  });
23
24  e.setAttribute("aria-expanded", "true");
25  memberInfo.setAttribute("aria-hidden", "false");
26  memberInfo.style.height = bio.offsetHeight + "px";
27}
28
29function closeBio(e) {
30  const memberInfo = e.querySelector(".member-info");
31  if (memberInfo) {
32    e.setAttribute("aria-expanded", "false");
33    memberInfo.setAttribute("aria-hidden", "true");
34    memberInfo.style.height = 0;
35  }
36}

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.