PageSourceSearch

https://hopeccs.org/wp-content/themes/HopeChineseCharterSchool/js/custom.js?ver=1787936363

js hopeccs.org collected 2026-10-04 12:28:53 UTC 2,504 bytes, 44 lines download raw bytes

1// 1. ADD ICONS AFTER BUTTON TEXT
2// 2. REPLACE LOGO ON PRESCHOOL PAGE
3// 3. FAQ ACCORDION
4
5jQuery(document).ready(function ($) {
6
7    //1 . ADD ICONS AFTER BUTTON TEXT
8    $('.wp-block-button a').after('<svg class="button-svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Pro 6.7.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2024 Fonticons, Inc.--><path class="fa-secondary" opacity=".4" d="M208 224l0 64 120 0c13.3 0 24 10.7 24 24l0 53.8L462 256 352 146.2l0 53.8c0 13.3-10.7 24-24 24l-120 0z"/><path class="fa-primary" d="M352 146.2L462 256 352 365.8l0-53.8c0-13.3-10.7-24-24-24l-120 0 0-64 120 0c13.3 0 24-10.7 24-24l0-53.8zM512 256c0-11.5-4.6-22.5-12.7-30.6L383.2 109.6c-8.7-8.7-20.5-13.6-32.8-13.6c-25.6 0-46.4 20.8-46.4 46.4l0 33.6-96 0c-26.5 0-48 21.5-48 48l0 64c0 26.5 21.5 48 48 48l96 0 0 33.6c0 25.6 20.8 46.4 46.4 46.4c12.3 0 24.1-4.9 32.8-13.6L499.3 286.6c8.1-8.1 12.7-19.1 12.7-30.6zM168 80c13.3 0 24-10.7 24-24s-10.7-24-24-24L88 32C39.4 32 0 71.4 0 120L0 392c0 48.6 39.4 88 88 88l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0c-22.1 0-40-17.9-40-40l0-272c0-22.1 17.9-40 40-40l80 0z"/></svg>');
9
10    // 2. REPLACE LOGO ON PRESCHOOL PAGE
11    $('.page-id-27 .header-image').replaceWith('<img class="header-image is-logo-image" alt="Hope Chinese Charter School Tiny Dragons" src="/wp-content/uploads/2025/01/TD-logo.jpg" width="2586" height="1488">');
12    $('.page-id-27 .is-logo-image').replaceWith('<img class="header-image is-logo-image" alt="Hope Chinese Charter School Tiny Dragons" src="/wp-content/uploads/2025/01/TD-logo.jpg">');
13	
14	// 3. FAQ ACCORDION
15	$('.faq').click(function() {
16        const $clickedFaq = $(this);
17        const $otherFaqs = $clickedFaq.siblings('.faq');
18        
19        // Reset all other FAQs
20        $otherFaqs.find('p').css({
21            height: '0',
22            opacity: '0'
23        }).parent().removeClass('active');
24        
25        // Toggle the clicked FAQ
26        const $paragraph = $clickedFaq.find('p');
27        const isOpen = $paragraph.height() > 0;
28        
29        if (!isOpen) {
30            $paragraph.css({
31                height: $paragraph.prop('scrollHeight'),
32                opacity: '1'
33            });
34            $clickedFaq.addClass('active');
35        } else {
36            $paragraph.css({
37                height: '0',
38                opacity: '0'
39            });
40            $clickedFaq.removeClass('active');
41        }
42    });
43	
44});

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.