PageSourceSearch

https://www.malagalatina.com/wp-content/themes/ennlil/assets/js/scripts.js?ver=1.0

js malagalatina.com collected 2026-10-06 00:37:57 UTC 9,089 bytes, 418 lines download raw bytes

1(function($) {
2    "use strict";
3
4
5		jQuery(document).ready(function ($) {
6			
7		var sidemenuoption = $('.sidemenuoption');
8		var menuoption_open = $('.sidemenuoption-open');
9		var menuoption_close = $('.menuoption-close');
10		var overlay = $('.body-overlay');
11		var is_closed = true;
12		menuoption_open.on('click', function(e) {
13			e.preventDefault();
14			if (is_closed == true) {
15				is_closed = false;
16				sidemenuoption.removeClass('themelazer-close');
17				sidemenuoption.addClass('themelazer-open');
18				overlay.addClass('overlay-show');
19			} else {
20				is_closed = true;
21				sidemenuoption.removeClass('themelazer-open');
22				sidemenuoption.addClass('themelazer-close');
23				overlay.removeClass('overlay-show');
24			}
25		}); 
26		menuoption_close.add(overlay).on('click', function(e) {
27			e.preventDefault();
28			sidemenuoption.removeClass('themelazer-open');
29			sidemenuoption.addClass('themelazer-close');
30			overlay.removeClass('overlay-show');
31			is_closed = true;
32		});
33		
34		});
35	
36	
37	var ennlilWidgetsScripts = function( $scope, $ ) {
38
39		// Init
40		initFlickity();
41		
42		setTimeout(() => {
43            $('#flickity-thumbs').flickity('reloadCells');
44        }, 500);
45
46		/* Flickity Slider
47		-------------------------------------------------------*/
48		function initFlickity() {
49
50			// 1st carousel, main
51			$('#theme-flickity-box-slider').flickity({
52			  cellAlign: 'left',
53			  contain: true,
54			  pageDots: false,
55			  prevNextButtons: true,
56			  draggable: false,
57			  fade: true,
58			  imagesLoaded: true,
59			});
60
61			// 2nd carousel, navigation
62			$('#flickity-thumbs').flickity({
63			  cellAlign: 'left',
64			  asNavFor: '#theme-flickity-box-slider',
65			  imagesLoaded: true,
66			  contain: true,
67			  pageDots: false,
68			  prevNextButtons: false,
69			  // draggable: false
70			});
71
72		}
73
74	    }
75
76    $(window).on('elementor/frontend/init', function () {
77        elementorFrontend.hooks.addAction('frontend/element_ready/global', ennlilWidgetsScripts);
78    });
79	
80	
81	
82	    jQuery('.mainmenu ul.menu').slicknav({
83            allowParentLinks: true,
84			prependTo: '.ennlil-responsive-menu',
85        });
86
87	/* ----------------------------------------------------------- */
88	/*  Sticky Header
89	/* ----------------------------------------------------------- */
90	$(window).on('scroll', function () {
91
92      /**Fixed header**/
93      if ($(window).scrollTop() > 250) {
94      $('.navbar-sticky').addClass('sticky fade_down_effect');
95      } else {
96      $('.navbar-sticky').removeClass('sticky fade_down_effect');
97      }
98});
99
100
101	jQuery(window).load(function() {
102        jQuery("#preloader").fadeOut();
103    });
104
105		if ($('.frontpage-slider-two').length) {
106		$('.frontpage-slider-two').owlCarousel({
107			center: true,
108			items: 2,
109			autoplay: false,
110			autoplayTimeout: 3000,
111			smartSpeed: 800,
112			loop: true,
113			margin: 20,
114			singleItem : true,
115			dots: false,
116			nav: true,
117			navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"],
118			responsive: {
119				280: {
120					items: 1
121				},
122				576: {
123					items: 2
124				},
125				768: {
126					items: 2
127				}
128			}
129		});   
130	}		
131	
132	
133	if ($('.main-slider').length) {
134		$('.main-slider').owlCarousel({
135			items: 1,
136            loop: true,
137			autoplay: false,
138			autoplayTimeout: 3000,
139			autoplayHoverPause: true,
140            mouseDrag: true,
141			smartSpeed: 1100,
142			margin: 30,
143			dots: true,
144			nav: false,
145			navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"],
146			responsive: {
147				280: {
148					items: 1
149				},
150				576: {
151					items: 1
152				},
153				768: {
154					items: 1
155				}
156			}
157		});   
158	}	
159	
160	
161	if ($('.widget-post-slider').length) {
162		$('.widget-post-slider').owlCarousel({
163			items: 1,
164            loop: true,
165			autoplay: false,
166			autoplayTimeout: 3000,
167			autoplayHoverPause: true,
168            mouseDrag: true,
169			smartSpeed: 1100,
170			margin: 0,
171			dots: true,
172			nav: false,
173			navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"],
174			responsive: {
175				280: {
176					items: 1
177				},
178				576: {
179					items: 1
180				},
181				768: {
182					items: 1
183				}
184			}
185		});   
186	}	
187	
188	
189	/* ----------------------------------------------------------- */
190	/*  Trending Slider
191	/* ----------------------------------------------------------- */
192   
193   
194   if ($('.trending-slider').length > 0) {
195	$('.trending-slider').owlCarousel({
196		dots: false,
197		items: 4,
198		autoplay: false,
199		margin: 30,
200		reponsiveClass: true,
201		nav: true,
202		navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"],
203		autoplayHoverPause: true,
204		loop:true,
205		responsive: {
206			// breakpoint from 0 up
207			0: {
208				items: 1,
209			},
210			// breakpoint from 480 up
211			480: {
212				items: 1,
213			},
214			// breakpoint from 768 up
215			768: {
216				items: 2,
217			},
218			// breakpoint from 768 up
219			1200: {
220				items: 4,
221			}
222		}
223	});
224}
225
226	
227
228   /* ----------------------------------------------------------- */
229   /*  Video popup
230   /* ----------------------------------------------------------- */
231
232  if ($('.video-play-btn').length > 0) {
233   $('.video-play-btn').magnificPopup({
234       type: 'iframe',
235       mainClass: 'mfp-with-zoom',
236       zoom: {
237           enabled: true, // By default it's false, so don't forget to enable it
238
239           duration: 300, // duration of the effect, in milliseconds
240           easing: 'ease-in-out', // CSS transition easing function
241
242           opener: function (openerElement) {
243               return openerElement.is('img') ? openerElement : openerElement.find('img');
244           }
245       }
246   });
247}
248
249if ($('.ennlil_video_post_Button').length > 0) {
250   $('.ennlil_video_post_Button').magnificPopup({
251       type: 'iframe',
252       mainClass: 'mfp-with-zoom',
253       zoom: {
254           enabled: true, // By default it's false, so don't forget to enable it
255
256           duration: 300, // duration of the effect, in milliseconds
257           easing: 'ease-in-out', // CSS transition easing function
258
259           opener: function (openerElement) {
260               return openerElement.is('img') ? openerElement : openerElement.find('img');
261           }
262       }
263   });
264}
265
266
267   
268        // Search Popup JS
269        $('.close-btn').on('click',function() {
270            $('.search_box__Wrap').fadeOut();
271            $('.search-btn').show();
272            $('.close-btn').removeClass('active');
273        });
274        $('.search-btn').on('click',function() {
275            $(this).hide();
276            $('.search_box__Wrap').fadeIn();
277            $('.close-btn').addClass('active');
278        });
279	
280	$(".popular-grid-slider").owlCarousel(
281           {
282            items: 2,
283            dots: false,
284            loop: true,
285            nav: true,
286            margin: 30,
287            navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"],
288            responsive: {
289                // breakpoint from 0 up
290                0: {
291                    items: 1,
292                },
293                // breakpoint from 480 up
294                480: {
295                    items: 2,
296                },
297                // breakpoint from 768 up
298                768: {
299                    items: 2,
300                },
301                // breakpoint from 768 up
302                1200: {
303                    items: 2,
304                }
305            }
306        }
307    );
308	
309	
310	
311	/* ----------------------------------------------------------- */
312	/*  Back to top
313	/* ----------------------------------------------------------- */
314
315		$(window).scroll(function () {
316			if ($(this).scrollTop() > 300) {
317				 $('.backto').fadeIn();
318			} else {
319				 $('.backto').fadeOut();
320			}
321		});
322
323		// scroll body to 0px on click
324		$('.backto').on('click', function () {
325			 $('.backto').tooltip('hide');
326			 $('body,html').animate({
327				  scrollTop: 0
328			 }, 800);
329			 return false;
330		});
331		
332		$('.backto').tooltip('hide');
333	
334	
335	setTimeout(function()
336    {
337        $('#preloader').delay(150).fadeOut('slow');
338    }, 10000);
339	
340
341
342
343jQuery(window).load(function() {
344
345    var galleryThumbs = new Swiper('.gallery-thumbs', {
346      spaceBetween: 10,
347      slidesPerView: 4,
348      loop: true,
349      freeMode: true,
350      loopedSlides: 5, //looped slides should be the same
351      watchSlidesVisibility: true,
352      watchSlidesProgress: true,
353	  virtualTranslate: true,
354	  
355	  
356	 breakpoints: {
357			// when window width is >= 320px
358			320: {
359			  slidesPerView: 1,
360			  spaceBetween: 10
361			},
362			// when window width is >= 480px
363			480: {
364			  slidesPerView: 2,
365			  spaceBetween: 10
366			},
367			// when window width is >= 640px
368			640: {
369			  slidesPerView: 2,
370			  spaceBetween: 10
371			},
372			
373			991: {
374			  slidesPerView: 3,
375			  spaceBetween: 10
376			},
377			
378			1300: {
379			  slidesPerView: 4,
380			  spaceBetween: 10
381			}
382			
383			
384	}
385	  
386	  
387	  
388	  
389    });
390	
391
392	
393	
394	
395    var galleryTop = new Swiper('.gallery-top', {
396      spaceBetween: 10,
397      loop:true,
398      loopedSlides: 5, //looped slides should be the same
399      navigation: {
400        nextEl: '.swiper-button-next',
401        prevEl: '.swiper-button-prev',
402      },
403	  effect: 'fade',
404      thumbs: {
405        swiper: galleryThumbs,
406      },
407    });
408
409});
410
411
412
413
414
415
416
417
418})(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.