PageSourceSearch

https://buildingsurveyors.co.nz/_resources/themes/building-surveyors-theme/client/js/main.js?m=1773889278

js buildingsurveyors.co.nz collected 2026-09-29 02:41:17 UTC 2,159 bytes, 72 lines download raw bytes

1
2$('document').ready(function () {
3
4    $('#FindASurveyorForm').on('change keyup', debounce(300, function(e) {
5
6        let form = $(this),
7            region = form.find('select[name="Region"]').val(),
8            expertise = form.find('select[name="Expertise"]').val(),
9            name = form.find('input[name="Name"]').val(),
10            subscription = form.find('input[name="Subscription"]').val(),
11            url = new URL(document.location.href+'/findASurveyorResults'),
12            container = $('#FindASurveyorContainer');
13
14        if (e.which === 13) {
15            e.preventDefault();
16            return
17        }
18        form.submit(function(e){
19            e.preventDefault();
20        });
21
22        url.searchParams.append('Region', region);
23        url.searchParams.append('Expertise', expertise);
24        url.searchParams.append('Name', name);
25        url.searchParams.append('Subscription', subscription);
26
27        var loader =
28            '<div class="load-overlay">' +
29            '<div class="loading-icon balls">\n' +
30            '    <div></div>\n' +
31            '    <div></div>\n' +
32            '    <div></div>\n' +
33            '</div>' +
34            '</div>';
35
36        if (container.find('.load-overlay').length === 0) {
37            container.append(loader);
38        }
39
40        $.ajax({
41            url: url
42        }).success(function(result) {
43            container.html(result)
44        })
45    }));
46
47
48    // func       callback function
49    // wait       throttle time in ms
50    // immediate  bool, should callback be called on first event
51    function debounce(wait, func, immediate) {
52        var timeout;
53        return function () {
54            var context = this, args = arguments;
55            var later = function () {
56                timeout = null;
57                if (!immediate) func.apply(context, args);
58            };
59            var callNow = immediate && !timeout;
60            clearTimeout(timeout);
61            timeout = setTimeout(later, wait);
62            if (callNow) func.apply(context, args);
63        };
64    }
65
66});
67
68
69$('.floating-labels select').click(function() {
70    $(this).attr('value', $(this).val());
71});
72

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.