PageSourceSearch

https://www.hoxtoncircle.com/_resources/themes/hoxton/js/custom1.js?2026-09-30%2017:18:32

js hoxtoncircle.com collected 2026-09-30 17:19:12 UTC 7,490 bytes, 290 lines download raw bytes

1function validateFileSize(input) {
2    const maxSize = 3 * 1024 * 1024; // 1MB in bytes
3    const file = input.files[0];
4
5    if (file.size > maxSize) {
6        alert('The file size must not exceed 3MB.');
7        input.value = ''; // Clear the input
8    }
9}
10
11function showRemoveIcon(index) {
12    // Display the remove icon for the specific file input
13    const removeIcons = document.querySelectorAll('.remove-file');
14    if (removeIcons[index]) {
15        removeIcons[index].style.display = 'block';
16    }
17
18    const fileNames = document.querySelectorAll('.file-name');
19
20    if (fileNames[index]) {
21        fileNames[index].style.display = 'block';
22    }
23
24
25}
26
27function removeFile(index) {
28    // Clear the specific file input
29    const fileInputs = document.querySelectorAll('.vibefile input[type=file]');
30    if (fileInputs[index]) {
31        fileInputs[index].value = ""; // Reset the file input
32    }
33
34    // Hide the remove icon for the specific file input
35    const removeIcons = document.querySelectorAll('.remove-file');
36    if (removeIcons[index]) {
37        removeIcons[index].style.display = 'none';
38    }
39
40    const fileNameSpans = document.querySelectorAll('.file-name');
41    if (fileNameSpans[index]) {
42        fileNameSpans[index].style.display = 'none';
43    }
44
45    // Optionally, clear the file name display area for the specific file input
46    const fileNames = document.querySelectorAll('.cv-file_name');
47    if (fileNames[index]) {
48        fileNames[index].innerHTML = 'PDF (Preferred), DOCX, DOC, RTF, TXT up to 3MB';
49    }
50}
51
52// Add event listeners to each file input
53document.querySelectorAll('.vibefile input[type=file]').forEach((input, index) => {
54    input.addEventListener('change', () => showRemoveIcon(index));
55});
56
57// Add event listeners to each remove button
58document.querySelectorAll('.remove-file').forEach((button, index) => {
59    button.addEventListener('click', () => removeFile(index));
60});
61
62
63document.querySelectorAll('.accordion-section-inner').forEach(button => {
64    button.addEventListener('click', () => {
65        const icon = button.querySelector('.accordion-button');
66        const panel = button.querySelector('.accordion-panel');
67
68        // Check if the panel exists
69        if (panel) {
70            panel.classList.toggle('show'); // Toggle the 'show' class
71            icon.classList.toggle('accordion-active');
72        } else {
73            console.error('No panel found for this button.');
74        }
75    });
76});
77
78document.addEventListener('DOMContentLoaded', function() {
79    // Function to handle opening the modal with specific content
80    function openModalWithContent(event) {
81
82        event.preventDefault(); // Prevent default link behavior
83
84        // Get the closest testimonial element to find the corresponding hidden content
85        var testimonialElement = event.target.closest('.client-testimonial');
86        if (testimonialElement) {
87            var hiddenContentElement = testimonialElement.querySelector('.hidden_testimonial_content');
88            if (hiddenContentElement) {
89                var hiddenContent = hiddenContentElement.innerHTML;
90
91                // Get the target div in the modal
92                var targetDiv = document.querySelector('#modal_testimonial_content');
93                if (targetDiv) {
94                    // Clear any existing content and append new content
95                    targetDiv.innerHTML = hiddenContent;
96                } else {
97                    console.error('Target div not found.');
98                }
99            } else {
100                console.error('Hidden content div not found.');
101            }
102        }
103    }
104
105    // Attach event listeners to all "Read More" links
106    var readMoreLinks = document.querySelectorAll('.scroll-link.scroll-modal');
107    readMoreLinks.forEach(function(link) {
108        link.addEventListener('click', openModalWithContent);
109    });
110
111});
112
113function showModal(modalId) {
114    var modalElement = document.getElementById(modalId);
115    var modal = new bootstrap.Modal(modalElement);
116    modal.show();
117}
118
119function closePopup() {
120   // location.reload();
121
122
123}
124function nameonly(e){
125    var unicode=e.charCode? e.charCode : e.keyCode
126    if (unicode!=8 && unicode!=9)
127    {
128        if (unicode<65||unicode>90 && unicode<97||unicode>122)
129            return false
130    }
131}
132
133$(document).ready(function() {
134
135    $(".uploadFormContainer  .field.file.fileupload").on('change', 'input[type=file]', function (event) {
136        var newID = $(this).attr('id') + '-hint';
137
138        var newEle = $('<p id="' + newID + '"></p>');
139
140        $(this).after(newEle);
141        var text = $(this).val();
142        text = text.substring(text.lastIndexOf("\\") + 1, text.length);
143
144
145        newEle.text(text);
146
147
148    });
149});
150
151
152
153
154/**************************************************
155 @ Constructing a URL with parameters using jQuery
156 ***************************************************/
157function addQSParm(name, value, myUrl = '') {
158    if(myUrl == ''){
159        var myUrl = window.location.origin+''+window.location.pathname;
160    }
161
162    var re = new RegExp("([?&]" + name + "=)[^&]+", "");
163
164    function add(sep) {
165        myUrl += sep + name + "=" + encodeURIComponent(value);
166    }
167
168    function change() {
169        myUrl = myUrl.replace(re, "$1" + encodeURIComponent(value));
170    }
171    if (myUrl.indexOf("?") === -1) {
172        add("?");
173    } else {
174        if (re.test(myUrl)) {
175            change();
176        } else {
177            add("&");
178        }
179    }
180    return myUrl;
181}
182
183
184
185$.urlParam = function(name){
186    var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
187    if (results==null){
188        return null;
189    }
190    else{
191        return results[1] || 0;
192    }
193}
194
195document.addEventListener("DOMContentLoaded", function () {
196    setTimeout(function () {
197        if (window.location.hash === "#tab-3") {
198            var targetDiv = document.querySelector(".tab-pan.add-here");
199            if (targetDiv) {
200                targetDiv.classList.add("active");
201                console.log("Active class added successfully.");
202            }
203        }
204    }, 100); // Delay of 100ms
205});
206
207
208$(document).ready(function () {
209
210    $('#industrynews').on('submit', function (e) {
211
212
213        e.preventDefault();
214
215        if (! $('#industryEmail').length) {
216
217            alert(' Please input your email address to subscribe');
218            return false;
219        }
220
221
222        $('#sib-form input[name=EMAIL]').val( $('#industryEmail').val() );
223
224        $('#sib-form').submit();
225
226        setTimeout(function () {
227
228            alert('Thank you!');
229
230        }, 1000);
231
232
233    });
234
235
236    $('#industrynews').on('submit', function (e) {
237
238
239        e.preventDefault();
240
241        if (! $('#industryEmail').val().length) {
242
243            alert(' Please input your email address to subscribe');
244            return false;
245        }
246
247
248        $('#sib-form input[name=EMAIL]').val( $('#industryEmail').val() );
249
250        $('#sib-form').submit();
251
252        setTimeout(function () {
253
254            alert('Thank you!');
255
256        }, 1000);
257
258
259    });
260
261
262    $('#jobsupdate').on('submit', function (e) {
263
264
265        e.preventDefault();
266
267        if (! $('#jobEmail').val().length) {
268
269            alert(' Please input your email address to subscribe');
270            return false;
271        }
272
273
274        $('#sib-job-form input[name=EMAIL]').val( $('#jobEmail').val() );
275
276        $('#sib-job-form').submit();
277
278        setTimeout(function () {
279
280            alert('Thank you!');
281
282        }, 1000);
283
284
285    });
286
287
288
289});
290

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.