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