PageSourceSearch

https://antigentest.lv/js_template/custom.js

js antigentest.lv collected 2026-10-06 12:53:44 UTC 4,054 bytes, 172 lines download raw bytes

1/*---------------------------------------------------------------------
2    File Name: custom.js
3---------------------------------------------------------------------*/
4
5$(function () {
6
7    "use strict";
8
9    /* Preloader
10    -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */
11
12    // setTimeout(function () {
13    // 	$('.loader_bg').fadeToggle();
14    // }, 1500);
15
16    /* Tooltip
17    -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */
18
19    $(document).ready(function () {
20        $('[data-toggle="tooltip"]').tooltip();
21    });
22
23
24    /* Mouseover
25    -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */
26
27	$(document).ready(function(){
28		$(".main-menu ul li.megamenu").mouseover(function(){
29			if (!$(this).parent().hasClass("#wrapper")){
30			$("#wrapper").addClass('overlay');
31			}
32		});
33		$(".main-menu ul li.megamenu").mouseleave(function(){
34			$("#wrapper").removeClass('overlay');
35		});
36	});
37
38
39    /* Toggle sidebar
40    -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */
41
42    $(document).ready(function () {
43       $('#sidebarCollapse').on('click', function () {
44          $('#sidebar').toggleClass('active');
45          $(this).toggleClass('active');
46       });
47     });
48
49    /* Product slider
50    -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */
51     // optional
52     $('#blogCarousel').carousel({
53        interval: 5000
54     });
55
56
57});
58
59/* Toggle sidebar
60     -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */
61function openNav() {
62  document.getElementById("mySidepanel").style.width = "250px";
63}
64
65function closeNav() {
66  document.getElementById("mySidepanel").style.width = "0";
67}
68
69
70/* Animate js*/
71
72(function($) {
73  //Function to animate slider captions
74  function doAnimations(elems) {
75    //Cache the animationend event in a variable
76    var animEndEv = "webkitAnimationEnd animationend";
77
78    elems.each(function() {
79      var $this = $(this),
80        $animationType = $this.data("animation");
81      $this.addClass($animationType).one(animEndEv, function() {
82        $this.removeClass($animationType);
83      });
84    });
85  }
86
87  //Variables on page load
88  var $myCarousel = $("#carouselExampleIndicators"),
89    $firstAnimatingElems = $myCarousel
90      .find(".carousel-item:first")
91      .find("[data-animation ^= 'animated']");
92
93  //Initialize carousel
94  $myCarousel.carousel();
95
96  //Animate captions in first slide on page load
97  doAnimations($firstAnimatingElems);
98
99  //Other slides to be animated on carousel slide event
100  $myCarousel.on("slide.bs.carousel", function(e) {
101    var $animatingElems = $(e.relatedTarget).find(
102      "[data-animation ^= 'animated']"
103    );
104    doAnimations($animatingElems);
105  });
106})(jQuery);
107
108/* Toggle sidebar
109     -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */
110function openNav() {
111  document.getElementById("mySidepanel").style.width = "250px";
112}
113
114function closeNav() {
115  document.getElementById("mySidepanel").style.width = "0";
116}
117
118
119
120
121// owl-carousel
122$('.owl-carousel').owlCarousel({
123  loop: true,
124  margin: 15,
125  nav: true,
126
127  responsive: {
128    0: {
129      items: 1
130    },
131    600: {
132      items: 3
133    },
134    1000: {
135      items: 3
136    }
137  }
138})
139
140
141
142
143// menu js
144
145// define all UI variable
146const navToggler = document.querySelector('.nav-toggler');
147const navMenu = document.querySelector('.site-navbar ul');
148const navLinks = document.querySelectorAll('.site-navbar a');
149
150// load all event listners
151allEventListners();
152
153// functions of all event listners
154function allEventListners() {
155  // toggler icon click event
156  navToggler.addEventListener('click', togglerClick);
157  // nav links click event
158  navLinks.forEach( elem => elem.addEventListener('click', navLinkClick));
159}
160
161// togglerClick function
162function togglerClick() {
163  navToggler.classList.toggle('toggler-open');
164  navMenu.classList.toggle('open');
165}
166
167// navLinkClick function
168function navLinkClick() {
169  if(navMenu.classList.contains('open')) {
170    navToggler.click();
171  }
172}

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.