PageSourceSearch

https://enrollfirst.com/wp-content/themes/insur/assets/js/insur-theme.js?ver=1791401602

js enrollfirst.com collected 2026-10-07 19:33:59 UTC 10,296 bytes, 341 lines download raw bytes

1(function ($) {
2  "use strict";
3
4
5  // custom coursor
6  if ($(".custom-cursor").length) {
7    var cursor = document.querySelector(".custom-cursor__cursor");
8    var cursorinner = document.querySelector(".custom-cursor__cursor-two");
9    var a = document.querySelectorAll("a");
10
11    document.addEventListener("mousemove", function (e) {
12      var x = e.clientX;
13      var y = e.clientY;
14      cursor.style.transform = `translate3d(calc(${e.clientX}px - 50%), calc(${e.clientY}px - 50%), 0)`;
15    });
16
17    document.addEventListener("mousemove", function (e) {
18      var x = e.clientX;
19      var y = e.clientY;
20      cursorinner.style.left = x + "px";
21      cursorinner.style.top = y + "px";
22    });
23
24    document.addEventListener("mousedown", function () {
25      cursor.classList.add("click");
26      cursorinner.classList.add("custom-cursor__innerhover");
27    });
28
29    document.addEventListener("mouseup", function () {
30      cursor.classList.remove("click");
31      cursorinner.classList.remove("custom-cursor__innerhover");
32    });
33
34    a.forEach((item) => {
35      item.addEventListener("mouseover", () => {
36        cursor.classList.add("custom-cursor__hover");
37      });
38      item.addEventListener("mouseleave", () => {
39        cursor.classList.remove("custom-cursor__hover");
40      });
41    });
42  }
43
44
45
46  // Type Effect
47  if ($(".typed-effect").length) {
48    $(".typed-effect").each(function () {
49      var typedStrings = $(this).data("strings");
50      var typedTag = $(this).attr("id");
51      var typed = new Typed("#" + typedTag, {
52        typeSpeed: 100,
53        backSpeed: 100,
54        fadeOut: true,
55        loop: true,
56        strings: typedStrings.split(",")
57      });
58    });
59  }
60
61
62  if ($(".scroll-to-target").length) {
63    $(".scroll-to-target").on("click", function () {
64      var target = $(this).attr("data-target");
65      // animate
66      $("html, body").animate({
67        scrollTop: $(target).offset().top
68      },
69        1000
70      );
71
72      return false;
73    });
74  }
75
76
77  function dynamicCurrentMenuClass(selector) {
78    let FileName = window.location.href.split("/").reverse()[0];
79
80    selector.find("li").each(function () {
81      let anchor = $(this).find("a");
82      if ($(anchor).attr("href") == FileName) {
83        $(this).addClass("current");
84      }
85    });
86    // if any li has .current elmnt add class
87    selector.children("li").each(function () {
88      if ($(this).find(".current").length) {
89        $(this).addClass("current");
90      }
91    });
92    // if no file name return
93    if ("" == FileName) {
94      selector.find("li").eq(0).addClass("current");
95    }
96  }
97
98  if ($(".main-menu__list").length) {
99    // dynamic current class
100    let mainNavUL = $(".main-menu__list");
101    dynamicCurrentMenuClass(mainNavUL);
102  }
103  if ($(".service-details__sidebar-service-list").length) {
104    // dynamic current class
105    let mainNavUL = $(".service-details__sidebar-service-list");
106    dynamicCurrentMenuClass(mainNavUL);
107  }
108
109  if ($(".main-menu__list").length && $(".mobile-nav__container").length) {
110    let navContent = document.querySelector(".main-menu__list").outerHTML;
111    let mobileNavContainer = document.querySelector(".mobile-nav__container");
112    mobileNavContainer.innerHTML = navContent;
113  }
114  if ($(".sticky-header__content").length) {
115    let navContent = document.querySelector(".main-menu").innerHTML;
116    let mobileNavContainer = document.querySelector(".sticky-header__content");
117    mobileNavContainer.innerHTML = navContent;
118  }
119
120  if ($(".mobile-nav__container .main-menu__list").length) {
121    let dropdownAnchor = $(
122      ".mobile-nav__container .main-menu__list .menu-item-has-children > a"
123    );
124    dropdownAnchor.each(function () {
125      let self = $(this);
126      let toggleBtn = document.createElement("BUTTON");
127      toggleBtn.setAttribute("aria-label", "dropdown toggler");
128      toggleBtn.innerHTML = "<i class='fa fa-angle-down'></i>";
129      self.append(function () {
130        return toggleBtn;
131      });
132      self.find("button").on("click", function (e) {
133        e.preventDefault();
134        let self = $(this);
135        self.toggleClass("expanded");
136        self.parent().toggleClass("expanded");
137        self.parent().parent().children("ul").slideToggle();
138      });
139    });
140  }
141
142  if ($(".mobile-nav__toggler").length) {
143    $(".mobile-nav__toggler").on("click", function (e) {
144      e.preventDefault();
145      $(".mobile-nav__wrapper").toggleClass("expanded");
146      $("body").toggleClass("locked");
147    });
148  }
149
150  if ($(".search-toggler").length) {
151    $(".search-toggler").on("click", function (e) {
152      e.preventDefault();
153      $(".search-popup").toggleClass("active");
154      $(".mobile-nav__wrapper").removeClass("expanded");
155      $("body").toggleClass("locked");
156    });
157  }
158
159
160  if ($(".dynamic-year").length) {
161    let date = new Date();
162    $(".dynamic-year").html(date.getFullYear());
163  }
164
165  if ($(".wow").length) {
166    var wow = new WOW({
167      boxClass: "wow", // animated element css class (default is wow)
168      animateClass: "animated", // animation css class (default is animated)
169      mobile: true, // trigger animations on mobile devices (default is true)
170      live: true // act on asynchronously loaded content (default is true)
171    });
172    wow.init();
173  }
174
175  if ($("#donate-amount__predefined").length) {
176    let donateInput = $("#donate-amount");
177    $("#donate-amount__predefined")
178      .find("li")
179      .on("click", function (e) {
180        e.preventDefault();
181        let amount = $(this).find("a").text();
182        donateInput.val(amount);
183        $("#donate-amount__predefined").find("li").removeClass("active");
184        $(this).addClass("active");
185      });
186  }
187
188
189  function SmoothMenuScroll() {
190    var anchor = $(".scrollToLink");
191    if (anchor.length) {
192      anchor.children("a").bind("click", function (event) {
193        if ($(window).scrollTop() > 10) {
194          var headerH = "90";
195        } else {
196          var headerH = "90";
197        }
198        var target = $(this);
199        $("html, body")
200          .stop()
201          .animate({
202            scrollTop: $(target.attr("href")).offset().top - headerH + "px"
203          },
204            1200,
205            "easeInOutExpo"
206          );
207        anchor.removeClass("current");
208        anchor.removeClass("current-menu-ancestor");
209        anchor.removeClass("current_page_item");
210        anchor.removeClass("current-menu-parent");
211        target.parent().addClass("current");
212        event.preventDefault();
213      });
214    }
215  }
216  SmoothMenuScroll();
217
218  function OnePageMenuScroll() {
219    var windscroll = $(window).scrollTop();
220    if (windscroll >= 117) {
221      var menuAnchor = $(".one-page-scroll-menu .scrollToLink").children("a");
222      menuAnchor.each(function () {
223        var sections = $(this).attr("href");
224        $(sections).each(function () {
225          if ($(this).offset().top <= windscroll + 100) {
226            var Sectionid = $(sections).attr("id");
227            $(".one-page-scroll-menu").find("li").removeClass("current");
228            $(".one-page-scroll-menu")
229              .find("li")
230              .removeClass("current-menu-ancestor");
231            $(".one-page-scroll-menu")
232              .find("li")
233              .removeClass("current_page_item");
234            $(".one-page-scroll-menu")
235              .find("li")
236              .removeClass("current-menu-parent");
237            $(".one-page-scroll-menu")
238              .find("a[href*=\\#" + Sectionid + "]")
239              .parent()
240              .addClass("current");
241          }
242        });
243      });
244    } else {
245      $(".one-page-scroll-menu li.current").removeClass("current");
246      $(".one-page-scroll-menu li:first").addClass("current");
247    }
248  }
249
250  // window load event
251
252  $(window).on("load", function () {
253    if ($(".preloader").length) {
254      $(".preloader").fadeOut();
255    }
256
257  });
258
259  // window scroll event
260
261  $(window).on("scroll", function () {
262    if ($(".stricked-menu").length) {
263      var headerScrollPos = 130;
264      var stricky = $(".stricked-menu");
265      if ($(window).scrollTop() > headerScrollPos) {
266        stricky.addClass("stricky-fixed");
267      } else if ($(this).scrollTop() <= headerScrollPos) {
268        stricky.removeClass("stricky-fixed");
269      }
270    }
271    if ($(".scroll-to-top").length) {
272      var strickyScrollPos = 100;
273      if ($(window).scrollTop() > strickyScrollPos) {
274        $(".scroll-to-top").fadeIn(500);
275      } else if ($(this).scrollTop() <= strickyScrollPos) {
276        $(".scroll-to-top").fadeOut(500);
277      }
278    }
279
280    OnePageMenuScroll();
281  });
282
283  if ($(".before-after-twentytwenty").length) {
284    $(".before-after-twentytwenty").each(function () {
285      var Self = $(this);
286      var objName = Self.attr("id");
287      $("#" + objName).twentytwenty();
288
289      // hack for bs tab
290      $(document).on("shown.bs.tab", 'a[data-toggle="tab"]', function (e) {
291        var paneTarget = $(e.target).attr("data-target");
292        var $thePane = $(".tab-pane" + paneTarget);
293        var twentyTwentyContainer = "#" + objName;
294        var twentyTwentyHeight = $thePane.find(twentyTwentyContainer).height();
295        if (0 === twentyTwentyHeight) {
296          $thePane.find(twentyTwentyContainer).trigger("resize");
297        }
298      });
299    });
300  }
301
302  $(document).on('click', '.product__all-btn.insur_ajax ', function (e) {
303    $(".insur-overlay").fadeIn(300);
304  });
305
306  $(document.body).on('added_to_cart', function (event, fragments, cart_hash, $button) {
307    $(".insur-overlay").fadeOut(300);
308
309  });
310
311  if ($(".add").length) {
312    $(document).on("click", '.add', function () {
313      if ($(this).prev().val() < 999) {
314        $(this)
315          .prev()
316          .val(+$(this).prev().val() + 1);
317      }
318      $(this).prev().trigger('change');
319    });
320  }
321
322  if ($(".sub").length) {
323    $(document).on("click", '.sub', function () {
324      if ($(this).next().val() > 1) {
325        if ($(this).next().val() > 1)
326          $(this)
327            .next()
328            .val(+$(this).next().val() - 1);
329      }
330      $(this).next().trigger('change');
331    });
332  }
333	
334
335  // KPIs grid adjustment from 4 column to 3
336  $('.counter-one .col-md-6').removeClass('col-md-6').addClass('col-md-4');
337  $('.counter-one .col-lg-3').removeClass('col-lg-3').addClass('col-lg-4');
338  $('.counter-one .col-xl-3').removeClass('col-xl-3').addClass('col-xl-4');
339
340
341})(jQuery);

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.