PageSourceSearch

https://lintonusa.com/wp-content/themes/lintonusa/assets/js/custom.js?ver=1790756417

js lintonusa.com collected 2026-09-30 21:36:38 UTC 17,558 bytes, 516 lines download raw bytes

1var $ = jQuery;
2
3$(document).ready(function () {
4  const checkIcon = `
5    <svg class="li-icon" width="21" height="21" viewBox="0 0 21 21" fill="none"
6      xmlns="http://www.w3.org/2000/svg">
7      <path d="M10.1389 20.2778C15.7386 20.2778 20.2778 15.7386 20.2778 10.1389C20.2778 4.53919 15.7386 0 10.1389 0C4.53919 0 0 4.53919 0 10.1389C0 15.7386 4.53919 20.2778 10.1389 20.2778Z" fill="#242424"/>
8      <path d="M5.55053 10.7944L8.17247 13.4163L14.7273 6.86145"
9        stroke="white" stroke-width="1.55983"
10        stroke-linecap="round" stroke-linejoin="round"/>
11    </svg>
12  `;
13
14  $(".get_started_section .content-wrapper ul > li").each(function () {
15    $(this).prepend(checkIcon);
16  });
17  //Svg image
18  $(function () {
19    $(".svg-fill img, a.btn img, a.btn-link img").each(function () {
20      var $img = $(this);
21      var imgURL = $img.attr("src");
22
23      // Only process SVG files
24      if (!imgURL || !imgURL.toLowerCase().endsWith(".svg")) return;
25
26      var attributes = $img.prop("attributes");
27
28      $.get(imgURL, function (data) {
29        var $svg = $(data).find("svg");
30
31        if (!$svg.length) return; // safety check
32
33        $svg = $svg.removeAttr("xmlns:a");
34
35        $.each(attributes, function () {
36          $svg.attr(this.name, this.value);
37        });
38
39        $img.replaceWith($svg);
40      });
41    });
42  });
43  /*----------------mobile-menu------------------*/
44  $(".menu-toggle").on("click", function () {
45    if ($(this).hasClass("active")) {
46      $(this).removeClass("active");
47      $(this).siblings(".menu-toggle + div:has(>#primary-menu)").removeClass("open");
48      $("html").removeClass("dropdown-open");
49      $(this).parents(".site-header").removeClass("menu-open");
50      $(this).siblings(".menu-toggle + div:has(>#primary-menu)").find(".sub-menu").slideUp(0);
51      $(".main-navigation ul > li.menu-item-has-children").removeClass("open");
52      $(".main-navigation ul > li > .icon").html("+");
53    } else {
54      $(this).addClass("active");
55      $(this).siblings(".menu-toggle + div:has(>#primary-menu)").addClass("open");
56      $("html").addClass("dropdown-open");
57      $(this).parents(".site-header").addClass("menu-open");
58    }
59  });
60  /*-*/
61  $('<div class="icon">+</div>').insertAfter(".main-navigation ul li.menu-item-has-children > a");
62  $(document).on("click", ".main-navigation ul > li > .icon", function (e) {
63    if (!$(this).parent().hasClass("open")) {
64      $(this).parent().addClass("open");
65      $(this).html("-");
66      $(this).siblings(".sub-menu").slideDown();
67      $(this).parent("li").siblings("li").find(".sub-menu").slideUp(0);
68      $(this).parent("li").siblings("li").removeClass("open");
69      $(this).parent("li").siblings("li").find(".icon").html("+");
70    } else {
71      $(this).parent().removeClass("open");
72      $(this).html("+");
73      $(this).siblings(".sub-menu").slideUp(0);
74    }
75  });
76  /*
77  $(document).on("click", ".main-navigation ul > li.menu-item-has-children  > a", function (e) {
78        e.preventDefault();
79    if (!$(this).parent().hasClass("open")) {
80      $(this).parent().addClass("open");
81      $(this).siblings(".icon").html("-");
82      $(this).siblings(".sub-menu").slideDown();
83      $(this).parent("li").siblings("li").find(".sub-menu").slideUp(0);
84      $(this).parent("li").siblings("li").removeClass("open");
85      $(this).parent("li").siblings("li").find(".icon").html("+");
86    } else {
87      $(this).parent().removeClass("open");
88		      $(this).siblings(".icon").html("+");
89
90      $(this).siblings(".sub-menu").slideUp(0);
91    }
92  });*/
93  //accordion
94  /*$(".accordion-box:first-child").addClass("active");
95  $(".accordion-box:first-child").children("a").addClass("active");
96  $(".accordion-box:first-child").children(".content").css("display", "block");
97  $(".accordion-box:first-child").find(".accordion-sign").removeClass("closed").addClass("opened");*/
98  $(".accordion-box > a").on("click", function () {
99    if ($(this).hasClass("active")) {
100      $(this).removeClass("active");
101      $(this).parent().removeClass("active");
102      $(this).siblings(".content").slideUp(200);
103      $(".accordion-box .accordion-sign").removeClass("opened").addClass("closed");
104    } else {
105      $(this).parent().siblings().find(".accordion-sign").removeClass("opened").addClass("closed");
106      $(this).find(".accordion-sign").removeClass("closed").addClass("opened");
107      $(this).parent().siblings().find("a").removeClass("active");
108      $(this).addClass("active");
109      $(this).parent().addClass("active");
110      $(this).parent().siblings().removeClass("active");
111      $(this).parent().siblings().find(".content").slideUp(200);
112      $(this).siblings(".content").slideDown(200);
113    }
114  });
115  /*-*/
116  $(".service-wrapper .service-item .service-top .service-content a.service-toggle").on("click", function () {
117    const $toggle = $(this);
118    const $wrapper = $toggle.closest(".service-wrapper");
119    const $serviceTop = $toggle.closest(".service-top");
120    //const $serviceSiblings = $toggle.closest(".service-column").siblings(".service-column");
121    const $serviceBottom = $serviceTop.siblings(".service-bottom");
122
123    if ($toggle.hasClass("active")) {
124      // Closing current
125      $toggle.removeClass("active");
126      $serviceBottom.slideUp(200, function () {
127        // Check if ALL service-bottom inside wrapper are hidden
128        if ($wrapper.find(".service-bottom:visible").length === 0) {
129          $wrapper.removeClass("open");
130        }
131      });
132      //$serviceSiblings.show();
133    } else {
134      // Opening current
135      $toggle.addClass("active");
136      $wrapper.addClass("open");
137
138      $serviceBottom.slideDown(200);
139      //$serviceSiblings.hide();
140
141      // Close siblings
142      // $wrapper
143      //   .find(".service-item")
144      //   .not($toggle.closest(".service-item"))
145      //   .find(".service-bottom")
146      //   .slideUp(200, function () {
147      //     // After closing siblings, if no open items → remove open
148      //     if ($wrapper.find(".service-bottom:visible").length === 0) {
149      //       $wrapper.removeClass("open");
150      //     }
151      //   });
152
153      // Remove active from siblings toggle
154      //$wrapper.find(".service-item").not($toggle.closest(".service-item")).find(".service-toggle").removeClass("active");
155    }
156  });
157
158  // overview section
159  $(".overview_section.layout-two h3.h1").removeClass("h1");
160
161  //slider js
162  // TOP IMAGE SLIDER
163  jQuery(function ($) {
164    function initTeamSlider() {
165      // prevent duplicate init
166      if ($(".team-image-slider").hasClass("slick-initialized")) return;
167
168      const desktopArrows = $("#team_slider_desktop");
169      const mobileArrows = $("#team_slider_mobile");
170
171      if (!$(".team-image-slider").length) return; // no slider found
172      if ($(".team-image-slider").children().length < 1) return; // no slides found
173
174      $(".team-image-slider").slick({
175        slidesToShow: 3,
176        slidesToScroll: 1,
177        centerMode: false,
178        centerPadding: "0px",
179        arrows: true,
180        asNavFor: ".team-content-slider",
181        appendArrows: desktopArrows.length ? desktopArrows : undefined,
182        prevArrow:
183          '<div class="slick-arrow slick-prev"><svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M19.25 3.5L8.75 14L19.25 24.5" stroke="#242424" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></div>',
184        nextArrow:
185          '<div class="slick-arrow slick-next"><svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.75 24.5L19.25 14L8.75 3.5" stroke="#242424" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></div>',
186        responsive: [
187          {
188            breakpoint: 1200,
189            settings: {
190              slidesToShow: 2,
191              centerMode: false,
192              appendArrows: mobileArrows.length ? mobileArrows : undefined,
193            },
194          },
195          {
196            breakpoint: 768,
197            settings: {
198              slidesToShow: 1,
199              centerMode: true,
200              appendArrows: mobileArrows.length ? mobileArrows : undefined,
201            },
202          },
203        ],
204      });
205
206      $(".team-content-slider").slick({
207        slidesToShow: 1,
208        asNavFor: ".team-image-slider",
209        arrows: false,
210        fade: true,
211        adaptiveHeight: true,
212      });
213    }
214
215    // run after DOM + images + Elementor + ACF load
216    setTimeout(initTeamSlider, 300);
217  });
218  //
219
220  //latest-news
221
222  /*$(".testimonial-wrapper").slick({
223    dots: false,
224    arrows: true,
225    infinite: false,
226    autoplay: false,
227    autoplaySpeed: 5000,
228    speed: 600,
229    slidesToShow: 1,
230    slidesToScroll: 1,
231    //asNavFor: '.latest-news-inner',
232    prevArrow:
233      '<div class="slick-arrow slick-prev"><svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M19.25 3.5L8.75 14L19.25 24.5" stroke="#242424" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></div>',
234    nextArrow:
235      '<div class="slick-arrow slick-next"><svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.75 24.5L19.25 14L8.75 3.5" stroke="#242424" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></div>',
236     responsive: [
237      {
238        breakpoint: 1200,
239        settings: {
240          dots: true,
241          arrows: false,
242        },
243      },
244    ],
245  });*/
246
247  function fixCarouselTickerWidth($ticker) {
248    const $list = $ticker.find(".carouselTicker__list");
249    let $items = $list.children(".carouselTicker__item");
250
251    if (!$items.length) return;
252
253    let itemsWidth = 0;
254    $items.each(function () {
255      itemsWidth += jQuery(this).outerWidth(true);
256    });
257
258    const containerWidth = $ticker.outerWidth();
259
260    // Clone until it overflows
261    while (itemsWidth < containerWidth * 2) {
262      $items.clone(true).appendTo($list);
263      itemsWidth *= 2;
264      $items = $list.children(".carouselTicker__item");
265    }
266  }
267  $(".carouselTicker").each(function () {
268    fixCarouselTickerWidth($(this));
269  });
270
271  jQuery(".carouselTicker-start").carouselTicker({
272    direction: "next",
273  });
274
275  jQuery(".carouselTicker-left").carouselTicker({
276    direction: "next", // LTR
277    speed: 1,
278    delay: 30,
279  });
280
281  jQuery(".carouselTicker-right").carouselTicker({
282    direction: "prev", // RTL
283    speed: 1,
284    delay: 30,
285  });
286  /*-*/
287  let hasRun = false;
288
289  if ($(".our_results_section_inner").length) {
290    function sectionInView() {
291      const section = $(".our_results_section_inner");
292      const sectionTop = section.offset().top;
293      const sectionBottom = sectionTop + section.outerHeight();
294
295      const scrollTop = $(window).scrollTop();
296      const windowBottom = scrollTop + $(window).height();
297
298      return sectionBottom > scrollTop && sectionTop < windowBottom;
299    }
300
301    $(window).on("scroll load", function () {
302      if (!hasRun && sectionInView()) {
303        hasRun = true;
304        runCounter();
305      }
306    });
307  }
308});
309let vh = window.innerHeight * 0.01;
310document.documentElement.style.setProperty("--vh", `${vh}px`);
311
312window.addEventListener("resize", () => {
313  let vh = window.innerHeight * 0.01;
314  document.documentElement.style.setProperty("--vh", `${vh}px`);
315});
316
317var $header = $("header.site-header");
318var headerHeight = $header.outerHeight();
319document.documentElement.style.setProperty("--headerheight", `${headerHeight}px`);
320
321window.addEventListener("resize", () => {
322  var $header = $("header.site-header");
323  var headerHeight = $header.outerHeight();
324  document.documentElement.style.setProperty("--headerheight", `${headerHeight}px`);
325});
326
327// sticky header js start
328// Hide header on scroll down
329var $window = $(window);
330var lastScrollTop = 0;
331var $header = $("header.site-header");
332var headerHeight = $header.outerHeight();
333
334$window.scroll(function () {
335  var windowTop = $window.scrollTop();
336
337  if (windowTop >= headerHeight) {
338    $header.addClass("nav-up");
339  } else {
340    $header.removeClass("nav-up");
341    $header.removeClass("sticky");
342    $(".site").css("margin-top", 0);
343  }
344
345  if ($header.hasClass("nav-up")) {
346    if (windowTop < lastScrollTop) {
347      $header.addClass("sticky");
348      $(".site").css("margin-top", headerHeight);
349    } else {
350      $header.removeClass("sticky");
351      $(".site").css("margin-top", 0);
352    }
353  }
354
355  lastScrollTop = windowTop;
356  /*-*/
357
358  //jQuery(".carouselTicker").carouselTicker();
359  /*jQuery(".carouselTicker-start").carouselTicker({
360    direction: "next",
361  });
362  $(".carouselTicker-left").carouselTicker({
363    direction: "next",
364    speed: 1,
365    delay: 30,
366  });
367
368  $(".carouselTicker-right").carouselTicker({
369    direction: "prev",
370    reverse: true,
371    speed: 1,
372    delay: 30,
373  });*/
374  // CUSTOM BUTTONS
375  // $(".team-prev").on("click", function () {
376  //   $(".team-image-slider").slick("slickPrev");
377  // });
378
379  // $(".team-next").on("click", function () {
380  //   $(".team-image-slider").slick("slickNext");
381  // });
382});
383// sticky header js
384if ($(".custom-slider").length) {
385  document.querySelectorAll(".custom-slider").forEach((slider) => {
386    let isDown = false;
387    let startX;
388    let scrollLeft;
389
390    slider.addEventListener("mousedown", (e) => {
391      isDown = true;
392      slider.classList.add("active");
393      startX = e.pageX - slider.offsetLeft;
394      scrollLeft = slider.scrollLeft;
395    });
396
397    slider.addEventListener("mouseleave", () => {
398      isDown = false;
399      slider.classList.remove("active");
400    });
401
402    slider.addEventListener("mouseup", () => {
403      isDown = false;
404      slider.classList.remove("active");
405    });
406
407    slider.addEventListener("mousemove", (e) => {
408      if (!isDown) return;
409      e.preventDefault();
410      const x = e.pageX - slider.offsetLeft;
411      const walk = (x - startX) * 3; // scroll speed
412      slider.scrollLeft = scrollLeft - walk;
413    });
414  });
415}
416
417if ($(".result-content").length) {
418  jQuery(function ($) {
419    let hasRun = false;
420
421    function runCounter() {
422      $(".result-content h2").each(function () {
423        const $h2 = $(this);
424        if ($h2.data("counted")) return;
425        $h2.data("counted", true);
426
427        const originalHTML = $h2.html();
428
429        // Extract span content (+, %, etc.)
430        const spanHTML = $h2.find("span").length ? $h2.find("span")[0].outerHTML : "";
431
432        // Text without span
433        const textWithoutSpan = $h2.clone().children().remove().end().text().trim();
434
435        // Prefix before number ($)
436        const prefixMatch = textWithoutSpan.match(/^[^\d]+/) || [];
437        const prefix = prefixMatch[0] || "";
438
439        // Number only
440        const numberMatch = textWithoutSpan.match(/[\d.]+/);
441        const finalNumber = numberMatch ? parseFloat(numberMatch[0]) : 0;
442
443        // Text after number (like M)
444        const middleText = textWithoutSpan.replace(prefix, "").replace(numberMatch[0], "");
445
446        // Reset before animation
447        $h2.html(prefix + "0" + middleText + spanHTML);
448
449        $({count: 0}).animate(
450          {count: finalNumber},
451          {
452            duration: 2000,
453            easing: "swing",
454            step: function () {
455              $h2.html(prefix + Math.floor(this.count) + middleText + spanHTML);
456            },
457            complete: function () {
458              $h2.html(prefix + finalNumber + middleText + spanHTML);
459            },
460          },
461        );
462      });
463    }
464  });
465}
466document.addEventListener("DOMContentLoaded", function () {
467  const items = document.querySelectorAll(".business_model_item");
468
469  const observer = new IntersectionObserver(
470    (entries, observer) => {
471      if (entries[0].isIntersecting) {
472        items.forEach((item, index) => {
473          setTimeout(() => {
474            item.classList.add("fade-up");
475          }, index * 200);
476        });
477        observer.disconnect(); // run once
478      }
479    },
480    {threshold: 0.3},
481  );
482
483  if (items.length) {
484    observer.observe(items[0]);
485  }
486});
487
488document.addEventListener("DOMContentLoaded", () => {
489  // Controls (as seen below) works in such a way that as soon as you explicitly define (add) one control
490  // to the settings, ALL default controls are removed and you have to add them back in by defining those below.
491
492  // For example, let's say you just simply wanted to add 'restart' to the control bar in addition to the default.
493  // Once you specify *just* the 'restart' property below, ALL of the controls (progress bar, play, speed, etc) will be removed,
494  // meaning that you MUST specify 'play', 'progress', 'speed' and the other default controls to see them again.
495
496  const controls = [
497    "play-large", // The large play button in the center
498    "restart", // Restart playback
499    "rewind", // Rewind by the seek time (default 10 seconds)
500    "play", // Play/pause playback
501    "fast-forward", // Fast forward by the seek time (default 10 seconds)
502    "progress", // The progress bar and scrubber for playback and buffering
503    "current-time", // The current time of playback
504    "duration", // The full duration of the media
505    "mute", // Toggle mute
506    "volume", // Volume control
507    "captions", // Toggle captions
508    "settings", // Settings menu
509    "pip", // Picture-in-picture (currently Safari only)
510    "airplay", // Airplay (currently Safari only)
511    "download", // Show a download button with a link to either the current source or a custom URL you specify in your options
512    "fullscreen", // Toggle fullscreen
513  ];
514
515  const player = Plyr.setup(".js-player", {controls});
516});

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.