PageSourceSearch

https://www.this.nhs.uk/typo3conf/ext/thiswebsite_sitepackage/Resources/Public/JavaScript/custom.js?1790586352

js this.nhs.uk collected 2026-10-08 13:48:38 UTC 2,026 bytes, 50 lines download raw bytes

1$(document).ready(function(){
2// Content
3    // - Image Borders
4    // Add a class of img-border to the first 2 images on the home page
5    $('.home main img').each(function (homeIndex) {
6        if (homeIndex < 2) {
7            $(this).addClass('img-border');
8        }
9    });
10
11    // - Testimonial Blocks
12    // Creates a new <div> around .testimonialBlock
13    $( ".testimonialBlock").wrap( "<div class='testimonialWrapper'></div>" );
14    // Creates an empty <div> inside .testimonialBlock for the quote icon
15    $(".testimonialBlock").prepend("<div class='quoteIcon'></div>");
16
17    // - Repeatable blocks
18
19    // -- Consultation
20    // Change request from a paragraph to an input
21    $('.thisRequest').replaceWith(function () {
22        return "<button type='button' id='requestToggleBtn' class='requestBtn'>Request</button>";
23    });
24
25    // Hide and show request form
26    $("#requestToggleBtn").click(function () {
27        // changes text on button based on whether the form is visible or not
28        $("#consultation .frame:last-child .colouredBlock").is(":visible") ? $(this).text("Request") : $(this).text("Hide Request");
29        // shows the form on click
30        $("#consultation .frame:last-child .colouredBlock").toggle();
31    });
32
33    // -- Testimonials
34    // Height match on testimonals quotes
35    // Select and loop the container element of the elements you want to equalise
36    $('#testimonials .colouredBlock .container .gridLayout .row').each(function(){
37        // Cache the highest
38        var highestBox = 0;
39        // Select and loop the elements you want to equalise
40        $('[class*="col-"] .thisQuote', this).each(function(){
41            // If this box is higher than the cached highest then store it
42            if($(this).height() > highestBox) {
43                highestBox = $(this).height();
44            }
45        });
46        // Set the height of all those children to whichever was highest
47        $('[class*="col-"] .thisQuote',this).height(highestBox);
48    });
49
50}); //end of document ready

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.