PageSourceSearch

https://nandamohanresidency.com/assets/js/main.js

js nandamohanresidency.com collected 2026-10-04 03:09:07 UTC 14,266 bytes, 515 lines download raw bytes

1/*=== Javascript function indexing hear===========
2
301. headerSticky()
402. swiperActivation()
503. wowActive()
604. videoActivation()
705. jaraLux()
806. backToTopInit()
907. cookiePopup()
1008. datePicker()
1109. magnificPopup()
1210. mobileMenu()
1311. desktopMenu()
1412. stickySidebar()
1513. Preloader()
16
17
18==================================================*/
19(function ($) {
20    'use strict';
21   
22    var rtsJs = {
23      m: function (e) {
24        rtsJs.d();
25        rtsJs.methods();
26      },
27      d: function (e) {
28          this._window = $(window),
29          this._document = $(document),
30          this._body = $('body'),
31          this._html = $('html')
32      },
33      methods: function (e) {
34        rtsJs.headerSticky();
35        rtsJs.swiperActivation();
36        rtsJs.wowActive();
37        rtsJs.videoActivation();
38        rtsJs.jaraLux();
39        rtsJs.backToTopInit();
40        rtsJs.cookiePopup();
41        rtsJs.datePicker();
42        rtsJs.magnificPopup();
43        rtsJs.mobileMenu();
44        rtsJs.desktopMenu();
45        rtsJs.stickySidebar();
46        rtsJs.preloader();
47      },
48       // sticky Header
49      headerSticky: function () {
50        $(window).on("scroll", function() {
51          var ScrollBarPostion = $(window).scrollTop();
52          if (ScrollBarPostion > 100) {
53            $(".header__function").addClass("is__sticky");      
54          } else {
55            $(".header__function").removeClass("is__sticky");   
56          }
57        });
58      },
59      swiperActivation: function(){
60        $(document).ready(function(){
61          // HERO SLIDER 
62          var swiper = new Swiper(".banner__slider", {
63            direction: "horizontal",
64            slidesPerView: 1,
65            loop: true,
66            navigation: {
67              nextEl: ".next",
68              prevEl: ".prev",
69            },
70            speed: 1000,
71            effect: "slide",
72            autoplay: {
73              delay: 5000,
74              disableOnInteraction: false,
75            }
76          });
77
78          var swiper = new Swiper(".apartment__slider", {
79            slidesPerView: "3",
80            spaceBetween: 30,
81            centeredSlides: true,
82            loop: true,
83            speed: 1000,
84            effect: "slide",
85            pagination: {
86              el: ".rts-pagination",
87              clickable: true
88            },
89            breakpoints: {
90              0: {
91                slidesPerView: 1,
92                centeredSlides: false
93              },
94              768: {
95                slidesPerView: 2.1
96              },
97              1200: {
98                slidesPerView: 3
99              }
100            }
101          });
102
103          // TESTIMONIAL SLIDER
104          var swiper = new Swiper(".testimonial__slider", {
105            direction: "horizontal",
106            slidesPerView: 1,
107            loop: true,
108            speed: 1000,
109            centeredSlides: true,
110            autoplay: false,
111            navigation: {
112              nextEl: ".slider-button-next",
113              prevEl: ".slider-button-prev",
114            },
115          });
116          
117          // TESTIMONIAL SLIDER
118          var swiper = new Swiper(".testimonial__slider", {
119            direction: "horizontal",
120            slidesPerView: 1,
121            loop: true,
122            speed: 1000,
123            centeredSlides: true,
124            autoplay: false,
125            navigation: {
126              nextEl: ".button-next",
127              prevEl: ".button-prev",
128            },
129          });
130
131          // APARTMENT SLIDER
132          var apartMent = new Swiper(".room__slider", {
133            slidesPerView: 3,
134            spaceBetween: 30,
135            loop: true,
136            speed: 1000,
137            centeredSlides: true,
138            autoplay: false,
139            pagination: {
140              el: ".rts-pagination",
141              clickable: true
142            },
143            breakpoints: {
144              0: {
145                slidesPerView: 1,
146              },
147              575: {
148                slidesPerView: 1,
149              },
150              768: {
151                slidesPerView: 2,
152                centeredSlides: false
153              },
154              1200: {
155                slidesPerView: 3,
156              },
157              1400: {
158                slidesPerView: 3,
159              }
160            }
161          });
162
163          // APARTMENT SLIDER
164          var apartMent = new Swiper(".main__room__slider", {
165            slidesPerView: 4,
166            spaceBetween: 30,
167            loop: true,
168            speed: 1000,
169            centeredSlides: false,
170            autoplay: false,
171            pagination: {
172              el: ".rts-pagination",
173              clickable: true
174            },
175            breakpoints: {
176              0: {
177                slidesPerView: 1,
178              },
179              575: {
180                slidesPerView: 1,
181              },
182              768: {
183                slidesPerView: 2,
184                centeredSlides: false
185              },
186              992: {
187                slidesPerView: 2.5,
188                centeredSlides: false
189              },
190              1200: {
191                slidesPerView: 3,
192              },
193              1400: {
194                slidesPerView: 4,
195              }
196            }
197          });
198
199        // GALLERY SLIDER
200        let Gallery = new Swiper(".gallery__slider", {
201          slidesPerView: 4,
202          spaceBetween: 30,
203          loop: true,
204          speed: 1000,
205          autoplay: true,
206          navigation: {
207            nextEl: ".slider-button-next",
208            prevEl: ".slider-button-prev",
209          },
210          breakpoints: {
211            0: {
212              slidesPerView: 1,
213            },
214            575: {
215              slidesPerView: 2,
216            },
217            768: {
218              slidesPerView: 3,
219            },
220            1200: {
221              slidesPerView: 3,
222            },
223            1400: {
224              slidesPerView: 4,
225            }
226          }
227        });
228
229        // ROOM SLIDER FOUR
230        let RoomFour = new Swiper(".room__slider.is__home__four", {
231          slidesPerView: 2,
232          spaceBetween: 30,
233          loop: true,
234          speed: 1000,
235          autoplay: true,
236          navigation: {
237            nextEl: ".slider-button-next",
238            prevEl: ".slider-button-prev",
239          },
240          breakpoints: {
241            0: {
242              slidesPerView: 1,
243            },
244            768: {
245              slidesPerView: 2,
246            },  
247            1200: {
248              slidesPerView: 2,
249            },
250          }
251        });
252
253        // SERVICE SLIDER HOME FOUR
254        let serviceFour = new Swiper(".service__slider", {
255          slidesPerView: 4,
256          spaceBetween: 30,
257          loop: true,
258          speed: 1000,
259          autoplay: true,
260          pagination: {
261            el: ".rts-pagination",
262            clickable: true
263          },
264          breakpoints: {
265            0: {
266              slidesPerView: 1,
267            },
268            767: {
269              slidesPerView: 2.01,
270            },
271            991: {
272              slidesPerView: 2.5,
273            },
274            1200: {
275              slidesPerView: 3,
276            },
277            1400: {
278              slidesPerView: 3,
279            },
280            1600: {
281              slidesPerView: 4,
282            }
283          }
284        });
285
286        // SERVICE SLIDER HOME FIVE
287        let serviceFive = new Swiper(".service__slider__five", {
288          slidesPerView: 3.05,
289          spaceBetween: 30,
290          loop: true,
291          speed: 1000,
292          autoplay: true,
293          centeredSlides: true,
294          navigation: {
295            nextEl: ".slider-button-next",
296            prevEl: ".slider-button-prev",
297          },
298          breakpoints: {
299            0: {
300              slidesPerView: 1,
301              centeredSlides: false,
302            },
303            767: {
304              slidesPerView: 2.01,
305              centeredSlides: false,
306            },
307            991: {
308              slidesPerView: 2.5,
309              centeredSlides: false,
310            },
311            1200: {
312              slidesPerView: 3,
313            },
314            1400: {
315              slidesPerView: 3,
316            }
317          }
318        });
319
320        // VIDEO TEXT SLIDER
321        let videoText = new Swiper(".video__text__slider", {
322          slidesPerView: 1,
323          spaceBetween: 0,
324          loop: true,
325          speed: 1000,
326          autoplay: true,
327          autoplay: {
328            delay: 5000,
329          }
330        });
331
332        // Initialize the main slider (model__hero__top)
333        var mainSlider = new Swiper('.testimonial__author', {
334            slidesPerView: 1,
335            loop: true,
336            speed: 1000,
337            grabCursor: true,
338            effect: 'fade',
339        });
340
341        // Initialize the thumbnail slider (model__hero__slider)
342        var thumbSlider = new Swiper('.tm__slider__five', {
343            slidesPerView: 1,
344            loop: true,
345            speed: 1000,
346            effect: 'slide',
347            grabCursor: true,
348            autoplay: {
349                delay: 3000,
350            },
351            navigation: {
352                nextEl: ".button-next",
353                prevEl: ".button-prev",
354            },
355        });
356        // Synchronize the two sliders
357        mainSlider.controller.control = thumbSlider;
358        thumbSlider.controller.control = mainSlider;
359        });
360         
361        // instagram slider
362        var instaSlider = new Swiper('.insta__gallery__slider', {
363            slidesPerView: 6,
364            loop: true,
365            speed: 1000,
366            spaceBetween: 15,
367            grabCursor: true,
368            autoplay: {
369                delay: 3000,
370            },
371            breakpoints: {
372              0: {
373                slidesPerView: 1,
374              },
375              480: {
376                slidesPerView: 2,
377              },
378              576: {
379                slidesPerView: 2,
380              },
381              768: {
382                slidesPerView: 3,
383              },
384              992: {
385                slidesPerView: 4,
386              },
387              1200: {
388                slidesPerView: 6,
389              },
390            }
391          });
392
393      },  
394      wowActive: function () {
395        new WOW().init();
396      },
397
398      videoActivation: function (e) {
399        $(document).ready(function() {
400          $('.popup-youtube, .popup-vimeo, .popup-gmaps, .video-play').magnificPopup({
401            disableOn: 700,
402            type: 'iframe',
403            mainClass: 'mfp-fade',
404            removalDelay: 160,
405            preloader: false,
406            fixedContentPos: false
407          });
408        });
409      },
410
411      jaraLux: function (e) {
412        $(document).ready(function() {
413          // Function to detect if the device is mobile
414          function isMobileDevice() {
415              return /Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
416          }
417      
418          // Initialize jarallax only if it's not a mobile device
419          if (!isMobileDevice()) {
420              $('.jarallax').jarallax();
421          } else {
422              console.log('Jarallax skipped on mobile devices');
423          }
424      });
425      
426      },
427
428      backToTopInit: function (e) {
429        $(document).ready(function () {
430          var backButton = $("#rts-back-to-top");
431          $(window).scroll(function () {
432            if ($(this).scrollTop() > 100) {
433              backButton.addClass("show");
434            } else {
435              backButton.removeClass("show");
436            }
437          });
438          backButton.on("click", function () {
439            $("html, body").animate(
440              {
441                scrollTop: 0,
442              },
443              1000
444            );
445          });
446        });
447      },
448
449      cookiePopup: function (e) {
450        $.gdprcookie.init();
451      },
452      datePicker: function (e) {
453        $(function () {
454          $("#check__in, #check__out").datepicker({
455              dateFormat: "dd-mm-yy",
456              duration: "fast"
457          });
458      });
459      },
460      magnificPopup: function (e) {
461        $('.gallery').each(function() { 
462          $(this).magnificPopup({
463              delegate: 'a', 
464              type: 'image',
465              gallery: {
466                enabled:true
467              }
468          });
469      });
470      },
471      mobileMenu: function (e) {
472        try {
473          $(".offcanvas__menu").meanmenu({
474            meanMenuContainer: ".mobile__menu__active",
475            meanScreenWidth: "991",
476            meanExpand: ["+"],
477          });
478        } catch (error) {
479          console.log(error);
480        }
481      },
482      desktopMenu: function (e) {
483        $(document).ready(function() {
484          $('.has__children .toggle').on('click', function(event) {
485              event.preventDefault(); // Prevent the default action of the click event
486              
487              var $parentLi = $(this).closest('li'); // Get the closest <li> element
488      
489              // Toggle the 'active' class on the parent <li> to show/hide the submenu
490              $parentLi.toggleClass('active');
491              
492              // Optionally, close other open menus by removing the 'active' class from other <li> elements
493              $('.has__children').not($parentLi).removeClass('active');
494          });
495      });
496      },
497      stickySidebar: function (e) {
498        if (typeof $.fn.theiaStickySidebar !== "undefined") {
499          $(".sticky-wrap .sticky-item").theiaStickySidebar({
500            additionalMarginTop: 100,
501          });
502        }
503      },
504      preloader: function (e){
505        window.addEventListener('load',function(){
506          document.querySelector('body').classList.add("loaded")  
507        });     
508      }
509
510    }
511    rtsJs.m(); 
512
513  
514  })(jQuery, window)  
515

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.