PageSourceSearch

https://www.vantagepointsoftware.com/wp-content/themes/vantagepoint-ai/customjs/custom.js

js vantagepointsoftware.com collected 2026-09-28 07:24:48 UTC 10,628 bytes, 474 lines download raw bytes

1window.onscroll = function() {stickyHeaderFunction()};
2
3var header = document.getElementById("site-header");
4var sticky = header.offsetTop;
5
6function stickyHeaderFunction() {
7  if (window.pageYOffset > sticky) {
8    header.classList.add("sticky");
9  } else {
10    header.classList.remove("sticky");
11  }
12}
13
14// Counter Home
15
16let count = document.querySelectorAll(".count")
17let arr = Array.from(count)
18
19
20
21arr.map(function(item) {
22  let startnumber = 0
23
24  function counterup() {
25    startnumber++
26    item.innerHTML = startnumber
27
28    if (startnumber == item.dataset.number) {
29      clearInterval(stop)
30    }
31  }
32
33  let stop = setInterval(function() {
34    counterup()
35  }, 50)
36
37})
38
39
40// slick
41
42
43
44
45jQuery.noConflict();
46jQuery(document).ready(function($) {
47  $('.banner-slider').slick({
48    dots: true,
49    autoplay: true,
50    infinite: false,
51    speed: 300,
52    slidesToShow: 1,
53    slidesToScroll: 1,
54    responsive: [
55      {
56        breakpoint: 1024,
57        settings: {
58          slidesToShow: 3,
59          slidesToScroll: 3,
60          infinite: true,
61          dots: true
62        }
63      },
64      {
65        breakpoint: 600,
66        settings: {
67          slidesToShow: 2,
68          slidesToScroll: 2
69        }
70      },
71      {
72        breakpoint: 480,
73        settings: {
74          slidesToShow: 1,
75          slidesToScroll: 1
76        }
77      }
78    ]
79  });
80});
81
82jQuery(document).ready(function($) {
83$('.about-slider').slick({
84  dots: false,
85 autoplay: false,
86  infinite: true,
87  speed: 300,
88  slidesToShow: 6,
89  slidesToScroll: 1,
90  variableWidth: false,
91  centerMode: false,
92 arrows: true,
93  responsive: [
94    {
95      breakpoint: 1024,
96      settings: {
97        slidesToShow: 4,
98        slidesToScroll: 1,
99        infinite: true,
100        arrows: true,
101        dots: false
102      }
103    },
104    {
105      breakpoint: 600,
106      settings: {
107        slidesToShow: 2,
108        slidesToScroll: 2,
109        arrows: true,
110        dots: false
111      }
112    },
113    {
114      breakpoint: 480,
115      settings: {
116
117        slidesToShow: 2,
118        slidesToScroll: 4,
119        arrows: true,
120        dots: false
121      }
122    }
123    // You can unslick at a given breakpoint now by adding:
124    // settings: "unslick"
125    // instead of a settings object
126  ]
127});
128
129});
130jQuery(document).ready(function($) {
131  $('.testimonial-slider').slick({
132    dots: false,
133    autoplay: true,
134    infinite: false,
135    speed: 300,
136    slidesToShow: 1,
137    slidesToScroll: 1,
138    responsive: [
139      {
140        breakpoint: 1024,
141        settings: {
142          slidesToShow: 2,
143          slidesToScroll: 3,
144          infinite: true,
145          dots: true
146        }
147      },
148      {
149        breakpoint: 600,
150        settings: {
151          slidesToShow: 2,
152          slidesToScroll: 2
153        }
154      },
155      {
156        breakpoint: 480,
157        settings: {
158          slidesToShow: 1,
159          slidesToScroll: 1
160        }
161      }
162    ]
163  });
164});
165
166jQuery(document).ready(function($){
167    let ip_field = $('#ip-address');
168    let ip_address = '';
169    if(ip_field.length > 0) {
170        //get the ip address and add it
171        $.getJSON('https://iploc.vantagepointsoftware.com/', function(data){
172            ip_address = data.ipAddress;
173        });
174        if(ip_address !== "") {
175            ip_field.val(ip_address);
176        }
177    }
178});
179
180// work compensation
181jQuery(".grateful-slider").slick({
182   slidesToShow: 1,
183   infinite:true,
184   slidesToScroll: 1,
185   autoplay: true,
186   autoplaySpeed: 2000
187     // dots: false, Boolean
188    // arrows: false, Boolean
189  });
190
191// home
192 jQuery("#slickSlider").slick({
193   slidesToShow: 3,
194   infinite:false,
195   slidesToScroll: 1,
196   autoplay: true,
197   autoplaySpeed: 2000,
198   arrows: true,
199
200  });
201
202  // About
203  jQuery("#serviceslickSlider").slick({
204    slidesToShow: 6,
205    infinite:true,
206    slidesToScroll: 1,
207    autoplay: true,
208    autoplaySpeed: 8000,
209    arrows: true,
210   });
211  // auto accidents
212   jQuery(".slick-slider").slick({
213    slidesToShow: 1,
214    infinite:true,
215    slidesToScroll: 1,
216    autoplay: true,
217    autoplaySpeed: 2000
218      // dots: false, Boolean
219     // arrows: false, Boolean
220   });
221
222
223jQuery("#serviceslickSlidernew").slick({
224    slidesToShow: 6,
225      infinite: true,
226      slidesToScroll: 1,
227      autoplay: true,
228      autoplaySpeed: 3000,
229      arrows: true
230   });
231
232
233
234
235
236
237
238jQuery("#toggle-2").click(function() {
239  var elem = jQuery("#toggle-2").text();
240  if (elem == "Read More") {
241      //Stuff to do when btn is in the read more state
242      jQuery("#toggle-2").text("Read Less");
243      jQuery("#text-2").slideDown();
244  } else {
245      //Stuff to do when btn is in the read less state
246      jQuery("#toggle-2").text("Read More");
247      jQuery("#text-2").slideUp();
248  }
249});
250
251jQuery("#toggle-3").click(function() {
252  var elem = jQuery("#toggle-3").text();
253  if (elem == "Read More") {
254      //Stuff to do when btn is in the read more state
255      jQuery("#toggle-3").text("Read Less");
256      jQuery("#text-3").slideDown();
257  } else {
258      //Stuff to do when btn is in the read less state
259      jQuery("#toggle-3").text("Read More");
260      jQuery("#text-3").slideUp();
261  }
262});
263
264
265jQuery("#toggle-4").click(function() {
266  var elem = jQuery("#toggle-4").text();
267  if (elem == "Read More") {
268      //Stuff to do when btn is in the read more state
269      jQuery("#toggle-4").text("Read Less");
270      jQuery("#text-4").slideDown();
271  } else {
272      //Stuff to do when btn is in the read less state
273      jQuery("#toggle-4").text("Read More");
274      jQuery("#text-4").slideUp();
275  }
276});
277
278jQuery("#toggle-5").click(function() {
279  var elem = jQuery("#toggle-5").text();
280  if (elem == "Read More") {
281      //Stuff to do when btn is in the read more state
282      jQuery("#toggle-5").text("Read Less");
283      jQuery("#text-5").slideDown();
284  } else {
285      //Stuff to do when btn is in the read less state
286      jQuery("#toggle-5").text("Read More");
287      jQuery("#text-5").slideUp();
288  }
289});
290
291jQuery("#toggle-6").click(function() {
292  var elem = jQuery("#toggle-6").text();
293  if (elem == "Read More") {
294      //Stuff to do when btn is in the read more state
295      jQuery("#toggle-6").text("Read Less");
296      jQuery("#text-6").slideDown();
297  } else {
298      //Stuff to do when btn is in the read less state
299      jQuery("#toggle-6").text("Read More");
300      jQuery("#text-6").slideUp();
301  }
302});
303
304jQuery("#toggle-7").click(function() {
305  var elem = jQuery("#toggle-7").text();
306  if (elem == "Read More") {
307      //Stuff to do when btn is in the read more state
308      jQuery("#toggle-7").text("Read Less");
309      jQuery("#text-7").slideDown();
310  } else {
311      //Stuff to do when btn is in the read less state
312      jQuery("#toggle-7").text("Read More");
313      jQuery("#text-7").slideUp();
314  }
315});
316jQuery("#toggle-8").click(function() {
317  var elem = jQuery("#toggle-8").text();
318  if (elem == "Read More") {
319      //Stuff to do when btn is in the read more state
320      jQuery("#toggle-8").text("Read Less");
321      jQuery("#text-8").slideDown();
322  } else {
323      //Stuff to do when btn is in the read less state
324      jQuery("#toggle-8").text("Read More");
325      jQuery("#text-8").slideUp();
326  }
327});
328
329
330jQuery("#toggle-9").click(function() {
331  var elem = jQuery("#toggle-9").text();
332  if (elem == "Read More") {
333      //Stuff to do when btn is in the read more state
334      jQuery("#toggle-9").text("Read Less");
335      jQuery("#text-9").slideDown();
336  } else {
337      //Stuff to do when btn is in the read less state
338      jQuery("#toggle-9").text("Read More");
339      jQuery("#text-9").slideUp();
340  }
341});
342
343
344/*document.addEventListener('DOMContentLoaded', function() {
345    var sourceField = document.querySelector('input[name="hidden-1"]'); // Use your actual hidden field name
346    if (sourceField) {
347        sourceField.value = window.location.href; // Set the field to the current page URL
348    }
349});
350*/
351
352// Parallax Image on Stock Page
353document.addEventListener('DOMContentLoaded', function () {
354    // Select the two different parallax containers
355    const banner1 = document.querySelector('.parallax-move1');  // First container for the first image
356    let img1 = null;
357    if(banner1 !== null) {
358        img1 = banner1.querySelector('img');  // Select the image in the first container
359    }
360
361    const banner2 = document.querySelector('.parallax-move2');  // Second container for the second image
362    let img2 = null;
363    if(banner2 !== null) {
364        img2 = banner2.querySelector('img');  // Select the image in the second container
365    }
366
367    // Add parallax-move class (optional) for extra styling or effects if needed
368    if(img1 !== null) {
369        img1.classList.add('parallax-move');
370    }
371    if(img2 !== null) {
372        img2.classList.add('parallax-move');
373    }
374
375    // Mouse move event for the first image
376    if(banner1 !== null) {
377        banner1.addEventListener('mousemove', function (e) {
378            const rect1 = banner1.getBoundingClientRect();
379            const x1 = e.clientX - rect1.left - rect1.width / 2;
380            const y1 = e.clientY - rect1.top - rect1.height / 2;
381
382            // Apply parallax effect on the first image
383            img1.style.transform = `translate(${x1 * 0.03}px, ${y1 * 0.04}px)`;  // Adjust the multipliers for sensitivity
384        });
385        // Reset the transforms when mouse leaves the divs
386        banner1.addEventListener('mouseleave', function () {
387            img1.style.transform = '';  // Reset the first image
388        });
389    }
390
391    // Mouse move event for the second image
392    if(banner2 !== null) {
393        banner2.addEventListener('mousemove', function (e) {
394            const rect2 = banner2.getBoundingClientRect();
395            const x2 = e.clientX - rect2.left - rect2.width / 2;
396            const y2 = e.clientY - rect2.top - rect2.height / 2;
397
398            // Apply parallax effect on the second image
399            img2.style.transform = `translate(${x2 * 0.05}px, ${y2 * 0.06}px)`;  // Adjust the multipliers for sensitivity
400        });
401        banner2.addEventListener('mouseleave', function () {
402            img2.style.transform = '';  // Reset the second image
403        });
404    }
405
406
407});
408
409
410// Parallax Images on Stock Page end
411
412
413
414// swipper slider
415
416
417var mySwiper = new Swiper('.swiper-container', {
418    loop: true,
419
420    slidesPerView: 2,
421    centeredSlides: true,
422
423    effect: 'coverflow',
424
425    coverflowEffect: {
426        rotate: 0,
427        stretch: 0,
428        depth: 300,
429        modifier: 3,
430        slideShadows: true,
431    },
432
433    pagination: {
434        el: '.swiper-pagination',
435        clickable: true,
436    },
437
438    navigation: {
439        nextEl: '.swiper-button-next',
440        prevEl: '.swiper-button-prev',
441    },
442});
443
444
445
446
447
448// swipper slider end
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474

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.