PageSourceSearch

https://tonygentile.it/js/main.js

js tonygentile.it collected 2026-10-02 12:24:45 UTC 5,483 bytes, 285 lines download raw bytes

1(function ($) {
2 "use strict";
3 
4$('.menu>li').slice(-2).addClass('last-elements'); 
5 
6 
7  $(window).on('scroll',function() {    
8   var scroll = $(window).scrollTop();
9   if (scroll < 20) {
10    $(".header-sticky").removeClass("sticky");
11   }else{
12    $(".header-sticky").addClass("sticky");
13   }
14  }); 
15
16 
17$('.main-menu nav').meanmenu({
18	meanScreenWidth: "991",
19	meanMenuContainer: '.mobile-menu'
20}); 
21 
22$('.grid').imagesLoaded( function() {
23	
24// filter items on button click
25$('.portfolio-menu').on( 'click', 'button', function() {
26  var filterValue = $(this).attr('data-filter');
27  $grid.isotope({ filter: filterValue });
28});	
29
30// init Isotope
31var $grid = $('.grid').isotope({
32  itemSelector: '.grid-item',
33  percentPosition: true,
34  masonry: {
35    // use outer width of grid-sizer for columnWidth
36    columnWidth: '.grid-item',
37  }
38});
39
40
41
42});
43
44$('.portfolio-menu button').on('click', function(event) {
45	$(this).siblings('.active').removeClass('active');
46	$(this).addClass('active');
47	event.preventDefault();
48});
49
50
51/* slider active  */ 
52$('.slider-active').owlCarousel({
53    loop:true,
54    animateOut: 'fadeOut',
55    animateIn: 'fadeIn',
56    items:1,
57    dots:false,
58    nav:true,
59    navText:['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],
60    responsive:{
61        0:{
62            items:1
63        },
64        600:{
65            items:1
66        },
67        1000:{
68            items:1
69        }
70    }
71})
72
73/* slider active  */ 
74$('.slider-active-five').owlCarousel({
75    loop:true,
76    animateOut: 'fadeOut',
77    animateIn: 'fadeIn',
78    items:1,
79    dots:false,
80    nav:true,
81    navText:['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],
82    responsive:{
83        0:{
84            items:1
85        },
86        600:{
87            items:1
88        },
89        1000:{
90            items:1
91        }
92    }
93})
94
95/* slider active  */ 
96$('.slider-text-active').owlCarousel({
97    loop:true,
98    animateOut: 'fadeOut',
99    animateIn: 'fadeIn',
100    items:1,
101    dots:false,
102    nav:true,
103    navText:['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],
104    responsive:{
105        0:{
106            items:1
107        },
108        600:{
109            items:1
110        },
111        1000:{
112            items:1
113        }
114    }
115})
116
117/* portfolio active  */ 
118$('.portfolio-slider').owlCarousel({
119    loop:true,
120    items:1,
121    dots:false,
122    animateOut: 'fadeOut',
123    animateIn: 'fadeIn',	
124    nav:true,
125    navText:['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],
126    responsive:{
127        0:{
128            items:1
129        },
130        600:{
131            items:1
132        },
133        1000:{
134            items:1
135        }
136    }
137})
138/* testimonial active  */ 
139$('.testimonial-active').owlCarousel({
140    loop:true,
141    items:1,
142    dots:false,
143    nav:false,
144    responsive:{
145        0:{
146            items:1
147        },
148        600:{
149            items:1
150        },
151        1000:{
152            items:1
153        }
154    }
155})
156
157/*--
158Magnific Popup
159------------------------*/
160$('.img-poppu').magnificPopup({
161    type: 'image',
162    gallery:{
163        enabled:true
164    }
165});
166    
167    
168    /*--
169    Magnific Popup
170    ------------------------*/
171    $('.video-popup').magnificPopup({
172        type: 'iframe',
173        mainClass: 'mfp-fade',
174        removalDelay: 160,
175        preloader: false,
176        zoom: {
177            enabled: true,
178        }
179    });
180
181    
182    
183    
184    
185    
186    
187    
188    
189/*--
190menu-toggle
191------------------------*/
192$('.menu-toggle').on('click', function(){
193	if( $('.menu-toggle').hasClass('is-active') ){
194		$('.main-menu nav').removeClass('menu-open');
195	}else {
196		$('.main-menu nav').addClass('menu-open');
197	}
198});
199
200    
201/*--
202	Hamburger js
203-----------------------------------*/
204var forEach=function(t,o,r){if("[object Object]"===Object.prototype.toString.call(t))for(var c in t)Object.prototype.hasOwnProperty.call(t,c)&&o.call(r,t[c],c,t);else for(var e=0,l=t.length;l>e;e++)o.call(r,t[e],e,t)};
205
206var hamburgers = document.querySelectorAll(".hamburger");
207if (hamburgers.length > 0) {
208  forEach(hamburgers, function(hamburger) {
209	hamburger.addEventListener("click", function() {
210	  this.classList.toggle("is-active");
211	}, false);
212  });
213}
214
215
216/*--------------------------
217    scrollUp
218    ---------------------------- */	
219    $(window).on('scroll',function () {
220        if($(window).scrollTop()>200) {
221            $("#toTop").fadeIn();
222        } else {
223            $("#toTop").fadeOut();
224        }
225    });
226    $('#toTop').on('click', function() {
227        $("html,body").animate({
228            scrollTop:0
229        }, 500)
230    }); 
231
232
233    /*---------------------
234       Circular Bars - Knob
235    --------------------- */	
236	  if(typeof($.fn.knob) != 'undefined') {
237		$('.knob').each(function () {
238		  var $this = $(this),
239			  knobVal = $this.attr('data-rel');
240	
241		  $this.knob({
242			'draw' : function () { 
243			  $(this.i).val(this.cv + '%')
244			}
245		  });
246		  
247		  $this.appear(function() {
248			$({
249			  value: 0
250			}).animate({
251			  value: knobVal
252			}, {
253			  duration : 2000,
254			  easing   : 'swing',
255			  step     : function () {
256				$this.val(Math.ceil(this.value)).trigger('change');
257			  }
258			});
259		  }
259, {accX: 0, accY: -150});
260		});
261    }	
262    
263    
264    
265    /*----------------------------
266    youtube video
267    ------------------------------ */
268    $('.youtube-bg').YTPlayer({
269        containment: '.youtube-bg',
270        autoPlay: true,
271        loop: true,
272    });
273    
274    
275    
276    
277    
278    
279    
280    
281    
282    
283
284 
285})(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.