PageSourceSearch

https://evolveinnove.github.io/assets/js/main.js

js evolveinnove.github.io collected 2026-10-03 09:10:43 UTC 5,287 bytes, 187 lines download raw bytes

1/**
2* Template Name: Scaffold - v2.0.0
3* Template URL: https://bootstrapmade.com/scaffold-bootstrap-metro-style-template/
4* Author: BootstrapMade.com
5* License: https://bootstrapmade.com/license/
6*/
7!(function($) {
8  "use strict";
9
10  // Smooth scroll for the navigation menu and links with .scrollto classes
11  $(document).on('click', '.nav-menu a, .mobile-nav a, .scrollto', function(e) {
12    if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
13      e.preventDefault();
14      var target = $(this.hash);
15      if (target.length) {
16
17        var scrollto = target.offset().top;
18
19        if ($('#header').length) {
20          scrollto -= $('#header').outerHeight() - 2
21
22        }
23
24        if ($(this).attr("href") == '#header') {
25          scrollto = 0;
26        }
27
28        $('html, body').animate({
29          scrollTop: scrollto
30        }, 1500, 'easeInOutExpo');
31
32        if ($(this).parents('.nav-menu, .mobile-nav').length) {
33          $('.nav-menu .active, .mobile-nav .active').removeClass('active');
34          $(this).closest('li').addClass('active');
35        }
36
37        if ($('body').hasClass('mobile-nav-active')) {
38          $('body').removeClass('mobile-nav-active');
39          $('.mobile-nav-toggle i').toggleClass('icofont-navigation-menu icofont-close');
40          $('.mobile-nav-overly').fadeOut();
41        }
42        return false;
43      }
44    }
45  });
46
47  // Mobile Navigation
48  if ($('.nav-menu').length) {
49    var $mobile_nav = $('.nav-menu').clone().prop({
50      class: 'mobile-nav d-lg-none'
51    });
52    $('body').append($mobile_nav);
53    $('body').prepend('<button type="button" class="mobile-nav-toggle d-lg-none"><i class="icofont-navigation-menu"></i></button>');
54    $('body').append('<div class="mobile-nav-overly"></div>');
55
56    $(document).on('click', '.mobile-nav-toggle', function(e) {
57      $('body').toggleClass('mobile-nav-active');
58      $('.mobile-nav-toggle i').toggleClass('icofont-navigation-menu icofont-close');
59      $('.mobile-nav-overly').toggle();
60    });
61
62    $(document).on('click', '.mobile-nav .drop-down > a', function(e) {
63      e.preventDefault();
64      $(this).next().slideToggle(300);
65      $(this).parent().toggleClass('active');
66    });
67
68    $(document).click(function(e) {
69      var container = $(".mobile-nav, .mobile-nav-toggle");
70      if (!container.is(e.target) && container.has(e.target).length === 0) {
71        if ($('body').hasClass('mobile-nav-active')) {
72          $('body').removeClass('mobile-nav-active');
73          $('.mobile-nav-toggle i').toggleClass('icofont-navigation-menu icofont-close');
74          $('.mobile-nav-overly').fadeOut();
75        }
76      }
77    });
78  } else if ($(".mobile-nav, .mobile-nav-toggle").length) {
79    $(".mobile-nav, .mobile-nav-toggle").hide();
80  }
81
82  // Navigation active state on scroll
83  var nav_sections = $('section');
84  var main_nav = $('.nav-menu, #mobile-nav');
85
86  $(window).on('scroll', function() {
87    var cur_pos = $(this).scrollTop() + 80;
88
89    nav_sections.each(function() {
90      var top = $(this).offset().top,
91        bottom = top + $(this).outerHeight();
92
93      if (cur_pos >= top && cur_pos <= bottom) {
94        if (cur_pos <= bottom) {
95          main_nav.find('li').removeClass('active');
96        }
97        main_nav.find('a[href="#' + $(this).attr('id') + '"]').parent('li').addClass('active');
98      }
99    });
100  });
101
102  // Toggle .header-scrolled class to #header when page is scrolled
103  $(window).scroll(function() {
104    if ($(this).scrollTop() > 100) {
105      $('#header').addClass('header-scrolled');
106    } else {
107      $('#header').removeClass('header-scrolled');
108    }
109  });
110
111  if ($(window).scrollTop() > 100) {
112    $('#header').addClass('header-scrolled');
113  }
114
115  // Back to top button
116  $(window).scroll(function() {
117    if ($(this).scrollTop() > 100) {
118      $('.back-to-top').fadeIn('slow');
119    } else {
120      $('.back-to-top').fadeOut('slow');
121    }
122  });
123
124  $('.back-to-top').click(function() {
125    $('html, body').animate({
126      scrollTop: 0
127    }, 1500, 'easeInOutExpo', function() {
128      $(".nav-menu ul:first li:first").addClass('active');
129    });
130
131    return false;
132  });
133
134  // Porfolio isotope and filter
135  $(window).on('load', function() {
136    var portfolioIsotope = $('.portfolio-container').isotope({
137      itemSelector: '.portfolio-item',
138      layoutMode: 'fitRows'
139    });
140
141    $('#portfolio-flters li').on('click', function() {
142      $("#portfolio-flters li").removeClass('filter-active');
143      $(this).addClass('filter-active');
144
145      portfolioIsotope.isotope({
146        filter: $(this).data('filter')
147      });
148    });
149
150    // Initiate venobox (lightbox feature used in portofilo)
151    $(document).ready(function() {
152      $('.venobox').venobox();
153    });
154  });
155
156  // Testimonials carousel (uses the Owl Carousel library)
157  $(".testimonials-carousel").owlCarousel({
158    autoplay: true,
159    dots: true,
160    loop: true,
161    responsive: {
162      0: {
163        items: 1
164      },
165      768: {
166        items: 2
167      },
168      900: {
169        items: 3
170      }
171    }
172  });
173
174  // Portfolio details carousel
175  $(".portfolio-details-carousel").owlCarousel({
176    autoplay: true,
177    dots: true,
178    loop: true,
179    items: 1
180  });
181
182  // Initi AOS
183  AOS.init({
184    duration: 800
185  });
186
187})(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.