PageSourceSearch

https://base-bites.com/resources/assets/web/assets/js/main.js

js base-bites.com collected 2026-10-02 01:24:03 UTC 11,330 bytes, 348 lines download raw bytes

1jQuery(function ($) {
2    'use strict';
3   
4		// Header Sticky
5		$(window).on('scroll',function() {
6            if ($(this).scrollTop() > 120){  
7                $('.navbar').addClass("is-sticky");
8            }
9            else{
10                $('.navbar').removeClass("is-sticky");
11            }
12		});
13
14		// Navbar JS
15        $('.navbar .navbar-nav li a').on('click', function(e){
16            var anchor = $(this);
17            $('html, body').stop().animate({
18                scrollTop: $(anchor.attr('href')).offset().top - 100
19            }, 100);
20            e.preventDefault();
21        });
22        $(document).on('click','.navbar-collapse.in',function(e) {
23            if( $(e.target).is('a') && $(e.target).attr('class') != 'dropdown-toggle' ) {
24                $(this).collapse('hide');
25            }
26        });
27		$('.navbar .navbar-nav li a').on('click', function(){
28            $('.navbar-collapse').collapse('hide');
29            $('.burger-menu').removeClass('active');
30		});
31
32        // Button Hover JS
33		$('.default-btn')
34		.on('mouseenter', function(e) {
35			var parentOffset = $(this).offset(),
36			relX = e.pageX - parentOffset.left,
37			relY = e.pageY - parentOffset.top;
38			$(this).find('span').css({top:relY, left:relX})
39		})
40		.on('mouseout', function(e) {
41			var parentOffset = $(this).offset(),
42			relX = e.pageX - parentOffset.left,
43			relY = e.pageY - parentOffset.top;
44			$(this).find('span').css({top:relY, left:relX})
45		});
46
47		// Preloader
48		jQuery(window).on('load', function () {
49			$('.preloader').fadeOut()
50		})
51
52		// Odometer JS
53        $('.odometer').appear(function(e) {
54			var odo = $(".odometer");
55			odo.each(function() {
56				var countNumber = $(this).attr("data-count");
57				$(this).html(countNumber);
58			});
59		});
60
61		// FAQ Accordion
62        $(function() {
63            $('.accordion').find('.accordion-title').on('click', function(){
64                // Adds Active Class
65                $(this).toggleClass('active');
66                // Expand or Collapse This Panel
67                $(this).next().slideToggle('fast');
68                // Hide The Other Panels
69                $('.accordion-content').not($(this).next()).slideUp('fast');
70                // Removes Active Class From Other Titles
71                $('.accordion-title').not($(this)).removeClass('active');		
72            });
73		});
74		
75		// Screenshot Slider
76		$('.screenshot-slider').owlCarousel({
77			loop: true,
78			nav: false,
79			dots: true,
80			autoplayHoverPause: true,
81			autoplay: true,
82            smartSpeed: 1000,
83            margin: 30,
84            navText: [
85                "<i class='flaticon-curve-arrow'></i>",
86                "<i class='flaticon-curve-arrow-1'></i>"
87            ],
88            responsive: {
89				0: {
90					items: 1
91				},
92				576: {
93					items: 1
94				},
95				768: {
96					items: 2
97				},
98				1024: {
99					items: 5
100				},
101				1200: {
102					items:6
103				}
104			}
105		});
106
107		// Feedback Carousel
108		var $imagesSlider = $(".testimonial-slides .client-feedback>div"),
109		$thumbnailsSlider = $(".client-thumbnails>div");
110		// Images Options
111		$imagesSlider.slick({
112			speed: 300,
113			slidesToShow: 1,
114			slidesToScroll: 1,
115			cssEase: 'linear',
116			fade: true,
117			autoplay: false,
118			draggable: true,
119			asNavFor: ".client-thumbnails>div",
120			prevArrow: '.client-feedback .prev-arrow',
121			nextArrow: '.client-feedback .next-arrow'
122		});
123		// Thumbnails Options
124		$thumbnailsSlider.slick({
125			speed: 300,
126			slidesToShow: 5,
127			slidesToScroll: 1,
128			cssEase: 'linear',
129			autoplay: false,
130			centerMode: true,
131			draggable: false,
132			focusOnSelect: true,
133			asNavFor: ".testimonial-slides .client-feedback>div",
134			prevArrow: '.client-thumbnails .prev-arrow',
135            nextArrow: '.client-thumbnails .next-arrow',
136		});
137		
138		// Tabs
139        (function ($) {
140            $('.tab ul.tabs').addClass('active').find('> li:eq(0)').addClass('current');
141            $('.tab ul.tabs li a').on('click', function (g) {
142                var tab = $(this).closest('.tab'), 
143                index = $(this).closest('li').index();
144                tab.find('ul.tabs > li').removeClass('current');
145                $(this).closest('li').addClass('current');
146                tab.find('.tab_content').find('div.tabs_item').not('div.tabs_item:eq(' + index + ')').slide
146Up();
147                tab.find('.tab_content').find('div.tabs_item:eq(' + index + ')').slideDown();
148                g.preventDefault();
149            });
150        })(jQuery);
151
152        // Popup Video
153		$('.popup-youtube').magnificPopup({
154			disableOn: 320,
155			type: 'iframe',
156			mainClass: 'mfp-fade',
157			removalDelay: 160,
158			preloader: false,
159			fixedContentPos: false
160        });
161
162		// Subscribe form
163		$(".newsletter-form").validator().on("submit", function (event) {
164			if (event.isDefaultPrevented()) {
165			// handle the invalid form...
166				formErrorSub();
167				submitMSGSub(false, "Please enter your email correctly.");
168			} else {
169				// everything looks good!
170				event.preventDefault();
171			}
172		});
173		function callbackFunction (resp) {
174			if (resp.result === "success") {
175				formSuccessSub();
176			}
177			else {
178				formErrorSub();
179			}
180		}
181		function formSuccessSub(){
182			$(".newsletter-form")[0].reset();
183			submitMSGSub(true, "Thank you for subscribing!");
184			setTimeout(function() {
185				$("#validator-newsletter").addClass('hide');
186			}, 4000)
187		}
188		function formErrorSub(){
189			$(".newsletter-form").addClass("animated shake");
190			setTimeout(function() {
191				$(".newsletter-form").removeClass("animated shake");
192			}, 1000)
193		}
194		function submitMSGSub(valid, msg){
195			if(valid){
196				var msgClasses = "validation-success";
197			} else {
198				var msgClasses = "validation-danger";
199			}
200			$("#validator-newsletter").removeClass().addClass(msgClasses).text(msg);
201		}
202		// AJAX MailChimp
203		$(".newsletter-form").ajaxChimp({
204			url: "https://envytheme.us20.list-manage.com/subscribe/post?u=60e1ffe2e8a68ce1204cd39a5&amp;id=42d6d188d9", // Your url MailChimp
205			callback: callbackFunction
206		});
207
208		/* Ripple Effect
209        ========================================================*/
210        $('.ripple-effect, .ripple-playing').ripples({
211            resolution: 512,
212            dropRadius: 25,
213            perturbance: 0.04,
214		});
215		
216		/* Practicle JS
217        ========================================================*/
218        if(document.getElementById("particles-js")) particlesJS("particles-js", {
219            "particles": {
220                "number": {
221                    "value": 50, "density": {
222                        "enable": true, "value_area": 800
223                    }
224                }
225                , "color": {
226                    "value": "#ffffff"
227                }
228                , "shape": {
229                    "type": "circle", "stroke": {
230                        "width": 0, "color": "#000000"
231                    }
232                    , "polygon": {
233                        "nb_sides": 5
234                    }
235                    , "image": {
236                        "src": "img/github.svg", "width": 100, "height": 100
237                    }
238                }
239                , "opacity": {
240                    "value": 0.5, "random": false, "anim": {
241                        "enable": false, "speed": 1, "opacity_min": 0.1, "sync": false
242                    }
243                }
244                , "size": {
245                    "value": 5, "random": true, "anim": {
246                        "enable": false, "speed": 40, "size_min": 0.1, "sync": false
247                    }
248                }
249                , "line_linked": {
250                    "enable": true, "distance": 150, "color": "#ffffff", "opacity": 0.4, "width": 1
251                }
252                , "move": {
253                    "enable": true, "speed": 6, "direction": "none", "random": false, "straight": false, "out_mode": "out", "attract": {
254                        "enable": false, "rotateX": 600, "rotateY": 1200
255                    }
256                }
257            }
258            , "interactivity": {
259                "detect_on": "canvas", "events": {
260                    "onhover": {
261                        "enable": true, "mode": "repulse"
262                    }
263                    , "onclick": {
264                        "enable": true, "mode": "push"
265                    }
266                    , "resize": true
267                }
268                , "modes": {
269                    "grab": {
270                        "distance": 400, "line_linked": {
271                            "opacity": 1
272                        }
273                    }
274                    , "bubble": {
275                        "distance": 400, "size": 40, "duration": 2, "opacity": 8, "speed": 3
276                    }
277                    , "repulse": {
278                        "distance": 200
279                    }
280                    , "push": {
281                        "particles_nb": 4
282                    }
283                    , "remove": {
284                        "particles_nb": 2
285                    }
286                }
287            }
288            , "retina_detect": true, "config_demo": {
289                "hide_card": false, "background_color": "#b61924", "background_image": "", "background_position": "50% 50%", "background_repeat": "no-repeat", "background_size": "cover"
290            }
291        });
292
293        // WOW JS
294        $(window).on ('load', function (){
295            if ($(".wow").length) { 
296                var wow = new WOW({
297                boxClass:     'wow',      // animated element css class (default is wow)
298                animateClass: 'animated', // animation css class (default is animated)
299                offset:       20,          // distance to the element when triggering the animation (default is 0)
300                mobile:       true, // trigger animations on mobile devices (default is true)
301                live:         true,       // act on asynchronously loaded content (default is true)
302            });
303            wow.init();
304            }
305        });
306
307		// Go to Top
308        $(function(){
309            // Scroll Event
310            $(window).on('scroll', function(){
311                var scrolled = $(window).scrollTop();
312                if (scrolled > 600) $('.go-top').addClass('active');
313                if (scrolled < 600) $('.go-top').removeClass('active');
314            });  
315            // Click Event
316            $('.go-top').on('click', function() {
317                $("html, body").animate({ scrollTop: "0" },  500);
318            });
319		});
320
321        // Switch Btn
322		$('body').append("<div class='switch-box'><label id='switch' class='switch'><input type='checkbox' onchange='toggleTheme()' id='slider'><span class='slider round'></span></label></div>");
323
324}(jQuery));
325
326// function to set a given theme/color-scheme
327function setTheme(themeName) {
328	localStorage.setItem('colugo_theme', themeName);
329	document.documentElement.className = themeName;
330}
331// function to toggle between light and dark theme
332function toggleTheme() {
333	if (localStorage.getItem('colugo_theme') === 'theme-dark') {
334		setTheme('theme-light');
335	} else {
336		setTheme('theme-dark');
337	}
338}
339// Immediately invoked function to set the theme on initial load
340(function () {
341	if (localStorage.getItem('colugo_theme') === 'theme-dark') {
342		setTheme('theme-dark');
343		document.getElementById('slider').checked = false;
344	} else {
345		setTheme('theme-light');
346	document.getElementById('slider').checked = true;
347	}
348})();

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.