PageSourceSearch

https://www.hashingadspace.com/a_dvert_iser/common/js/main.js

js hashingadspace.com collected 2026-10-04 06:01:13 UTC 3,330 bytes, 127 lines download raw bytes

1(function ($) {
2  "use strict";
3
4  /* 1. Proloder */
5  // $(window).on("load", function () {
6  //   $("#preloader-active").delay(450).fadeOut("slow");
7  //   $("body").delay(450).css({
8  //     overflow: "visible",
9  //   });
10  // });
11
12  // Back to top button
13  $(window).scroll(function () {
14    if ($(this).scrollTop() > 100) {
15      $(".back-to-top").fadeIn("slow");
16    } else {
17      $(".back-to-top").fadeOut("slow");
18    }
19  });
20  $(".back-to-top").click(function () {
21    $("html, body").animate({ scrollTop: 0 }, 1500, "easeInOutExpo");
22    return false;
23  });
24
25  // Initiate the wowjs animation library
26  new WOW().init();
27
28  // Header scroll class
29  $(window).scroll(function () {
30    if ($(this).scrollTop() > 100) {
31      $("#header").addClass("header-scrolled");
32    } else {
33      $("#header").removeClass("header-scrolled");
34    }
35  });
36
37  if ($(window).scrollTop() > 100) {
38    $("#header").addClass("header-scrolled");
39  }
40
41  // Smooth scroll for the navigation and links with .scrollto classes
42  $(".main-nav a, .mobile-nav a, .scrollto").on("click", function () {
43    if (
44      location.pathname.replace(/^\//, "") ==
45        this.pathname.replace(/^\//, "") &&
46      location.hostname == this.hostname
47    ) {
48      var target = $(this.hash);
49      if (target.length) {
50        var top_space = 0;
51
52        if ($("#header").length) {
53          top_space = $("#header").outerHeight();
54
55          if (!$("#header").hasClass("header-scrolled")) {
56            top_space = top_space - 40;
57          }
58        }
59
60        $("html, body").animate(
61          {
62            scrollTop: target.offset().top - top_space,
63          },
64          1500,
65          "easeInOutExpo"
66        );
67
68        if ($(this).parents(".main-nav, .mobile-nav").length) {
69          $(".main-nav .active, .mobile-nav .active").removeClass("active");
70          $(this).closest("li").addClass("active");
71        }
72
73        if ($("body").hasClass("mobile-nav-active")) {
74          $("body").removeClass("mobile-nav-active");
75          $(".mobile-nav-toggle i").toggleClass("fa-times fa-bars");
76          $(".mobile-nav-overly").fadeOut();
77        }
78        return false;
79      }
80    }
81  });
82
83  // Navigation active state on scroll
84  var nav_sections = $("section");
85  var main_nav = $(".main-nav, .mobile-nav");
86  var main_nav_height = $("#header").outerHeight();
87
88  $(window).on("scroll", function () {
89    var cur_pos = $(this).scrollTop();
90
91    nav_sections.each(function () {
92      var top = $(this).offset().top - main_nav_height,
93        bottom = top + $(this).outerHeight();
94
95      if (cur_pos >= top && cur_pos <= bottom) {
96        main_nav.find("li").removeClass("active");
97        main_nav
98          .find('a[href="#' + $(this).attr("id") + '"]')
99          .parent("li")
100          .addClass("active");
101      }
102    });
103  });
104
105  $(".owl-carousel").owlCarousel({
106    items: 3,
107    loop: true,
108    autoplay: true,
109    autoplayTimeout: 4000,
110    autoplayHoverPause: true,
111    responsive: {
112      0: {
113        items: 1,
114        nav: false,
115      },
116      600: {
117        items: 3,
118        nav: false,
119      },
120      1000: {
121        items: 3,
122        nav: false,
123        loop: true,
124      },
125    },
126  });
127})(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.