PageSourceSearch

https://www.shipleyschool.org/Templates/ShipleySchool/js/custom.js?v=1.162.0.6

js shipleyschool.org collected 2026-10-02 11:52:02 UTC 3,793 bytes, 97 lines download raw bytes

1/*
2=====================================
3Add website specific custom fucntions
4This JS reference is given to site-script.js
5=====================================
6*/
7$(document).ready(function () {
8    // initializeCustomScript();
9    //initCustomGIF();
10    
11    initCustomClientSlider();
12    initNavigationInline();
13    initMoveGalleryToNav();
14    initInputPlaceholder();
15});
16
17function initCustomClientSlider() {
18    /*if($(".custom-client-slider").length) {
19        $(".custom-client-slider-wrapper .site-slide").each(function() {
20            ($(this).find(".site-slider-caption .site-slider-caption-block")).clone().insertBefore(($(this).find(".site-slider-image-block"))).wrap("<div class='site-slider-title'></div>");
21            $(this).find(".site-slider-caption .site-slider-caption-block").remove();
22            $(this).children().wrapAll('<div class="custom-client-slider-data"></div>')
23        });
24    }*/
25
26    if($(".custom-client-slider").length) {
27    $(".custom-client-slider-wrapper .site-slide").each(function() {
28        ($(this).find(".site-slider-caption .site-slider-caption-block")).clone().appendTo(($(this).find(".site-slider-image-block"))).wrap("<div class='site-slider-title'></div>");
29        $(this).find(".site-slider-caption .site-slider-caption-block").remove();
30        $(this).children().wrapAll('<div class="custom-client-slider-data"></div>')
31        
32    });
33
34    $('.custom-client-slider .site-slick-wrapper').slick('slickSetOption', 'adaptiveHeight', true);
35    $('.custom-client-slider .site-slick-wrapper').slick('refresh');
36    }
37}
38
39function initInputPlaceholder() {
40    if($(".custom-placeholder").length) {
41        $(".custom-placeholder .site-form-block").each(function() {
42            var form_label = $(this).find(".site-form-label label").text();
43            $(this).find(".site-form-field input").attr("placeholder", form_label);
44        });
45    }
46}
47
48function initMoveGalleryToNav() {
49    //$("body:not(.cms-page-is-in-edit-mode) .custom-nav-gallery-wrapper").insertAfter(".site-navigation > ul.site-nav-block")
50}
51
52function initCustomGIF() {
53    if($(".custom-gif-style").length) {
54        $(".custom-gif-style").wrap("<div class='custom-gif-style-wrapper'></div>")
55    }
56 }
57
58function initNavigationInline() {
59
60    $(".site-navigation-inline li .site-subnav-wrapper").each(function() {
61         
62         $(this).children("ul").wrap( "<div class='site-subnav-wrapper-data'></div>" );
63         $(this).children(".site-subnav-wrapper-data").prepend('<div class="site-subnav-back">Back one level</div>');
64
65    });
66
67    $(".site-navigation-inline li.site-nav-child > a").on('click', function(event) {
68        event.preventDefault();
69
70        let target = $(this).parent("li");
71
72        if(target.hasClass(".level1")) {
73            target.find(".site-subnav-wrapper:first").find(".site-subnav-back").remove()
74        }
75
76        if(target.children(".site-subnav-wrapper").hasClass("site-subnav-wrapper-active")) {
77            $(".site-subnav-wrapper").removeClass("site-subnav-wrapper-active");
78            $(".site-header-gallery").removeClass("site-header-gallery-active");
79            return false;
80        }
81
82        $(".site-header-gallery").addClass("site-header-gallery-active");
83
84        if($(".custom-nav-gallery-wrapper").length) {
85            $('.custom-nav-gallery .site-slick-wrapper').slick('refresh');
86        }
87
88        if(target.hasClass("site-nav-child")) {
89            target.children(".site-subnav-wrapper").addClass("site-subnav-wrapper-active")
90        }
91    });
92
93    $(".site-subnav-back").on("click", function() {
94        $(this).parent().parent(".site-subnav-wrapper").removeClass("site-subnav-wrapper-active");
95        
96    });
97}

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.