PageSourceSearch

https://www.labiondadinonnamary.it/js/scripts.js

js labiondadinonnamary.it collected 2026-10-06 11:09:47 UTC 6,269 bytes, 263 lines download raw bytes

1(function ($) {
2  $(document).ready(function () {
3    "use strict";
4
5
6    // DATEPICKER
7    $('[data-toggle="datepicker"]').datepicker();
8
9
10    /* MENU TOGGLE */
11    $('.side-widget .site-menu ul li i').on('click', function (e) {
12      $(this).parent().children('.side-widget .site-menu ul li ul').toggle();
13      return true;
14    });
15
16
17    // TAB
18    $(".tab-nav li").on('click', function (e) {
19      $(".tab-item").hide();
20      $(".tab-nav li").removeClass('active');
21      $(this).addClass("active");
22      var selected_tab = $(this).find("a").attr("href");
23      $(selected_tab).stop().show();
24      return false;
25    });
26
27
28    // APPEAR IMAGE
29    $(".photo-gallery li figure a img, .instagram-feed ul li figure a img").hover(function () {
30        $('.photo-gallery li figure a img, .instagram-feed ul li figure a img').not(this).css({
31          "opacity": "0.3"
32        });
33      },
34      function () {
35        $('.photo-gallery li figure a img, .instagram-feed ul li figure a img').not(this).css({
36          "opacity": "1"
37        });
38      });
39
40
41    // HAMBURGER MENU
42    $('.hamburger').on('click', function (e) {
43      $(this).toggleClass('open');
44      $(".side-widget").toggleClass('active');
45      $("body").toggleClass("overflow");
46    });
47
48
49    // SEARCH BOX
50    $('.navbar .search').on('click', function (e) {
51      $(this).toggleClass('open');
52      $(".search-box").toggleClass('active');
53      $("body").toggleClass("overflow");
54    });
55
56
57    // PAGE TRANSITION
58    $('body a').on('click', function (e) {
59
60      var target = $(this).attr('target');
61      var fancybox = $(this).data('fancybox');
62      var url = this.getAttribute("href");
63      if (target != '_blank' && typeof fancybox == 'undefined' && url.indexOf('#') < 0) {
64
65
66        e.preventDefault();
67        var url = this.getAttribute("href");
68        if (url.indexOf('#') != -1) {
69          var hash = url.substring(url.indexOf('#'));
70
71
72          if ($('body ' + hash).length != 0) {
73            $('.page-transition').removeClass("active");
74
75
76          }
77        } else {
78          $('.page-transition').toggleClass("active");
79          setTimeout(function () {
80            window.location = url;
81          }, 1000);
82
83        }
84      }
85    });
86
87
88  });
89  // END DOCUMENT READY
90
91
92  // MASONRY
93  var $container = $(".masonry");
94  $container.imagesLoaded(function () {
95    $container.isotope({
96      itemSelector: '.masonry li',
97      layoutMode: 'masonry'
98    });
99  });
100
101
102  // MENU IMAGES SLIDER
103  var swipers = new Swiper('.menu-images-slider', {
104    slidesPerView: '1',
105    spaceBetween: 0,
106    loop: true,
107    pagination: {
108      el: '.swiper-pagination',
109      clickable: true,
110    }
111  });
112
113
114  // TESTIMONIALS SLIDER
115  var swipers = new Swiper('.testimonials-slider', {
116    slidesPerView: 'auto',
117    spaceBetween: 5,
118    centeredSlides: true,
119    loop: true,
120    pagination: {
121      el: '.swiper-pagination',
122      clickable: true,
123    }
124  });
125
126
127  // SLIDER
128  var menu = [];
129  jQuery('.swiper-slide').each(function (index) {
130    menu.push(jQuery(this).find('.slide-inner').attr("data-text"));
131  });
132  var interleaveOffset = 0.5;
133  var swiperOptions = {
134    loop: true,
135    speed: 1000,
136    parallax: true,
137    autoplay: {
138      delay: 3500,
139      disableOnInteraction: false,
140    },
141    grabCursor: true,
142    watchSlidesProgress: true,
143    pagination: {
144      el: '.fraction',
145      type: 'fraction',
146    },
147    navigation: {
148      nextEl: '.button-next',
149      prevEl: '.button-prev',
150    },
151    on: {
152      progress: function () {
153        var swiper = this;
154        for (var i = 0; i < swiper.slides.length; i++) {
155          var slideProgress = swiper.slides[i].progress;
156          var innerOffset = swiper.width * interleaveOffset;
157          var innerTranslate = slideProgress * innerOffset;
158          swiper.slides[i].querySelector(".slide-inner").style.transform =
159            "translate3d(" + innerTranslate + "px, 0, 0)";
160        }
161      },
162      touchStart: function () {
163        var swiper = this;
164        for (var i = 0; i < swiper.slides.length; i++) {
165          swiper.slides[i].style.transition = "";
166        }
167      },
168      setTransition: function (speed) {
169        var swiper = this;
170        for (var i = 0; i < swiper.slides.length; i++) {
171          swiper.slides[i].style.transition = speed + "ms";
172          swiper.slides[i].querySelector(".slide-inner").style.transition =
173            speed + "ms";
174        }
175      }
176    }
177  };
178
179  var swiper = new Swiper(".main-slider", swiperOptions);
180
181
182  // DATA BACKGROUND IMAGE
183  var pageSection = $("*");
184  pageSection.each(function (indx) {
185    if ($(this).attr("data-background")) {
186      $(this).css("background-image", "url(" + $(this).data("background") + ")");
187    }
188  });
189
190
191  // DATA BACKGROUND COLOR
192  var pageSection = $("*");
193  pageSection.each(function (indx) {
194    if ($(this).attr("data-background")) {
195      $(this).css("background-color", $(this).data("background"));
196    }
197  });
198
199
200  // STICKY NAVBAR
201  $(window).on("scroll touchmove", function () {
202    $('.navbar').toggleClass('sticky', $(document).scrollTop() > 0);
203
204  });
205
206
207  // STICKY UP DOWN
208  var didScroll;
209  var lastScrollTop = 0;
210  var delta = 0;
211  var navbarHeight = $('.navbar').outerHeight();
212
213  $(window).scroll(function (event) {
214    didScroll = true;
215  });
216
217  setInterval(function () {
218    if (didScroll) {
219      hasScrolled();
220      didScroll = true;
221    }
222  }, 0);
223
224  function hasScrolled() {
225    var st = $(this).scrollTop();
226
227    // Make sure they scroll more than delta
228    if (Math.abs(lastScrollTop - st) <= delta)
229      return;
230
231    // If they scrolled down and are past the navbar, add class .nav-up.
232    // This is necessary so you never see what is "behind" the navbar.
233    if (st > lastScrollTop && st > navbarHeight) {
234      // Scroll Down
235      $('.navbar').removeClass('nav-down').addClass('nav-up');
236    } else {
237      // Scroll Up
238      if (st + $(window).height() < $(document).height()) {
239        $('.navbar').removeClass('nav-up').addClass('nav-down');
240      }
241    }
242
243    lastScrollTop = st;
244  };
245
246
247  // WOW ANIMATION
248  wow = new WOW({
249    animateClass: 'animated',
250    offset: 50
251  });
252  wow.init();
253
254
255  // PARALLAX
256  $.stellar({
257    horizontalScrolling: false,
258    verticalOffset: 0,
259    responsive: true
260  });
261
262
263})(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.