PageSourceSearch

https://www.thomsonfoundation.org/js/thomson.js

js thomsonfoundation.org collected 2026-10-01 11:27:45 UTC 2,285 bytes, 79 lines download raw bytes

1// Thomson Theme JavaScript
2
3(function($) {
4    "use strict"; // Start of use strict
5
6    // jQuery for page scrolling feature - requires jQuery Easing plugin
7    $('a.page-scroll').bind('click', function(event) {
8        var $anchor = $(this);
9        $('html, body').stop().animate({
10            scrollTop: ($($anchor.attr('href')).offset().top - 50)
11        }, 1250, 'easeInOutExpo');
12        event.preventDefault();
13    });
14
15    // Highlight the top nav as scrolling occurs
16    $('body').scrollspy({
17        target: '.navbar-fixed-top',
18        offset: 51
19    });
20
21    // Closes the Responsive Menu on Menu Item Click
22    $('.navbar-collapse ul li a').click(function () {
23        var $navbarToggle = $('.navbar-toggle');
24        if ($navbarToggle.is(':visible') && $navbarToggle.hasClass('collapsed')) {
25            $navbarToggle.click();
26        }
27    });
28
29
30    // Offset for Main Navigation
31    $('#mainNav').affix({
32        offset: {
33            top: 100
34        }
35    })
36
37    // Clears input field 
38    $(".clearer").click(function () {
39        $('.navbar-toggle.open').click();
40    });
41
42
43    $(".grid-section > div").last().addClass("last");
44
45    //$("#searchform").submit(function (event) {
46    //    event.preventDefault();
47    //    debugger;
48    //    console.log($("#searchinput"));
49    //    var querystring = "/search/" + $("#searchinput").val();
50    //    console.log(querystring);
51    //    //window.location.href = querystring; 
52    //});
53
54    // Select and loop the container element of the elements you want to equalise
55
56    $(window).load(function () {
57        $('.container').each(function () {
58
59            // Cache the highest
60            var highestBox = 0;
61
62            // Select and loop the elements you want to equalise
63            $('.equil', this).each(function () {
64
65                // If this box is higher than the cached highest then store it
66                if ($(this).height() > highestBox) {
67                    highestBox = $(this).height();
68                }
69
70            });
71
72            // Set the height of all those children to whichever was highest 
73            $('.equil', this).height(highestBox);
74
75        });
76    })
77    
78
79})(jQuery); // End of use strict

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.