PageSourceSearch

https://www.gasnova.org/wp-content/themes/heal-wp/assets/js/functions_ver-5.1.13.js

js gasnova.org collected 2026-10-07 11:21:08 UTC 11,202 bytes, 406 lines download raw bytes

1jQuery(window).on('scroll', function (){
2    "use strict";
3    /*----------------------------- Navigation --------------------------*/
4    if (jQuery(window).scrollTop() > 100){
5      jQuery('#main-menu').addClass('menu-bg-overlay');
6    } else {
7      jQuery('#main-menu').removeClass('menu-bg-overlay');
8    }
9    if (jQuery(window).scrollTop() > 800){
10      jQuery('#main-menu').addClass('menu-bg');
11    } else {
12      jQuery('#main-menu').removeClass('menu-bg');
13    }
14
15
16  });
17
18
19var findID = jQuery('.menu-style2');
20if ( findID.length){
21
22var firstMenuHeight = 400;
23var secondMenuHeight = 560;  
24
25jQuery(window).bind('scroll', function () {
26    if (jQuery(window).scrollTop() > firstMenuHeight) {
27        jQuery('.main-menu-container').addClass('fixed-on-top');
28    } else {
29        jQuery('.main-menu-container').removeClass('fixed-on-top');
30    }
31
32    if (jQuery(window).scrollTop() > secondMenuHeight) {
33        jQuery('.main-menu-container').addClass('fix-menu');
34    } else {
35        jQuery('.main-menu-container').removeClass('fix-menu');
36    }
37
38});
39
40}
41
42  /*----------------- image popup -----------------*/
43  jQuery(".boxer").boxer();
44
45
46  /*------------------------- Causes Post Slider ----------------------------*/
47  var causestSlider = jQuery("#causes-post-slider");
48
49  causestSlider.owlCarousel({
50    loop:true,
51    // rtl:true,
52    margin:10,
53    nav:true,
54    navContainer: '#causes-owl-nav',
55    navText: ['<i class="fa fa-chevron-left"></i> ', '<i class="fa fa-chevron-right"></i>'],
56    navClass: ['slide-nav slide-left', 'slide-nav slide-right'],
57    responsiveClass:true,
58    responsive:{
59      0:{
60        items:1,
61        nav:true
62      },
63      600:{
64        items:2,
65        nav:true
66      },
67      1000:{
68        items:2,
69        nav:true,
70        loop:false
71      }
72    }
73      });
74
75 
76
77
78    /*------------------------- Upcoming Event Slider ----------------------------*/
79    var eventSlider = jQuery("#event-post-slider");
80
81    eventSlider.owlCarousel({
82      loop:true,
83      // rtl:true,
84      margin:10,
85      nav:true,
86      navContainer: '#event-owl-nav',
87      navText: ['<i class="fa fa-chevron-left"></i> ', '<i class="fa fa-chevron-right"></i>'],
88      navClass: ['slide-nav slide-left', 'slide-nav slide-right'],
89      responsiveClass:true,
90      responsive:{
91        0:{
92          items:1,
93          nav:true
94        },
95        600:{
96          items:2,
97          nav:true
98        },
99        1000:{
100          items:2,
101          nav:true,
102          loop:false
103        }
104      }
105    });
106 
107
108    /*-------------------------------- Parallax ---------------------------------------*/
109    jQuery(document).ready(function(){
110       "use strict";
111
112      jQuery('#top-section, #donate[data-type="background"], #clients[data-type="background"], .next-event[data-type="background"] ').each(function(){
113        var $bgobj = jQuery(this); // assigning the object
114
115        jQuery(window).scroll(function() {
116          var $window = jQuery(window);
117          var yPos = -($window.scrollTop() / $bgobj.data('speed')); 
118
119            // Put together our final background position
120            var coords = '50% '+ yPos + 'px';
121
122            // Move the background
123            $bgobj.css({ backgroundPosition: coords });
124          }); 
125      });    
126    });
127
128
129    jQuery(window).load(function($) {
130    "use strict";
131
132      /*------------------------------- Preloader -----------------------------------------*/
133      jQuery(".loader").fadeOut();
134      jQuery("#preloader").delay(350).fadeOut("slow");
135
136    });
137
138
139  jQuery(document).ready(function($) {
140    "use strict";
141
142    /*--------------------- Gallery Item Filter-----------------*/
143    var $container = jQuery('.isotope-gallery-items'),
144    colWidth = function () {
145      var w = $container.width(), 
146      columnNum = 1,
147      columnWidth = 0;
148      if (w > 960) {
149        columnNum  = 4;
150      }  else if (w > 768) {
151        columnNum  = 3;
152      }
153      else if (w > 480) {
154        columnNum  = 2;
155      }
156      columnWidth = Math.floor(w/columnNum);
157      $container.find('.item').each(function() {
158        var $item = $(this),
159        multiplier_w = $item.attr('class').match(/item-w(\d)/),
160        multiplier_h = $item.attr('class').match(/item-h(\d)/),
161        width = multiplier_w ? columnWidth*multiplier_w[1]-10 : columnWidth-10,
162        height = multiplier_h ? columnWidth*multiplier_h[1]*0.7-10 : columnWidth*0.7-10;
163        $item.css({
164          width: width,
165          height: height
166        });
167      });
168      return columnWidth;
169    },
170    isotope = function () {
171      $container.isotope({
172        resizable: true,
173        itemSelector: '.item',
174        masonry: {
175          columnWidth: colWidth(),
176          gutterWidth: 10
177        }
178      });
179    };
180    isotope();
181    $(window).smartresize(isotope);
182
183    $('.galleryFilter a').click(function(){
184      $('.galleryFilter .current').removeClass('current');
185      $(this).addClass('current');
186
187      var selector = $(this).attr('data-filter');
188      $container.isotope({
189        filter: selector,
190        animationOptions: {
191          duration: 750,
192          easing: 'linear',
193          queue: false
194        }
195      });
196      return false;
197    }); 
198
199
200
201    /*------------------------------- Element Appear Effect -----------------------------------------*/
202    jQuery('.from-top.delay-normal').each(function () {
203        "use strict";
204      jQuery(this).appear(function() {
205        jQuery(this).delay(150).animate({opacity:1,top:"0px"},600);
206      }); 
207    });
208
209    jQuery('.from-bottom.delay-normal').each(function () {
210        "use strict";
211      jQuery(this).appear(function() {
212        jQuery(this).delay(150).animate({opacity:1,bottom:"0px"},600);
213      }); 
214    });
215
216
217    jQuery('.from-bottom.delay-200').each(function () {
218        "use strict";
219      jQuery(this).appear(function() {
220        jQuery(this).delay(200).animate({opacity:1,bottom:"0px"},600);
221      }); 
222    });
223
224    jQuery('.from-bottom.delay-600').each(function () {
225        "use strict";
226      jQuery(this).appear(function() {
227        jQuery(this).delay(600).animate({opacity:1,bottom:"0px"},600);
228      }); 
229    });
230
231    jQuery('.from-bottom.delay-1000').each(function () {
232        "use strict";
233      jQuery(this).appear(function() {
234        jQuery(this).delay(1000).animate({opacity:1,bottom:"0px"},600);
235      }); 
236    });
237
238    jQuery('.from-bottom.delay-1400').each(function () {
239        "use strict";
240      jQuery(this).appear(function() {
241        jQuery(this).delay(1400).animate({opacity:1,bottom:"0px"},600);
242      }); 
243    });
244
245    jQuery('.from-left.delay-normal').each(function () {
246        "use strict";
247      jQuery(this).appear(function() {
248        jQuery(this).delay(150).animate({opacity:1,left:"0px"},600);
249      }); 
250    });
251
252
253    jQuery('.from-right.delay-normal').each(function () {
254        "use strict";
255      jQuery(this).appear(function() {
256        jQuery(this).delay(150).animate({opacity:1,right:"0px"},600);
257      }); 
258    });
259
260    jQuery('.from-right.delay-200').each(function () {
261        "use strict";
262      jQuery(this).appear(function() {
263        jQuery(this).delay(200).animate({opacity:1,right:"0px"},600);
264      }); 
265    });
266
267    jQuery('.from-right.delay-600').each(function () {
268        "use strict";
269      jQuery(this).appear(function() {
270        jQuery(this).delay(600).animate({opacity:1,right:"0px"},600);
271      }); 
272    });
273
274    jQuery('.from-right.delay-1000').each(function () {
275        "use strict";
276      jQuery(this).appear(function() {
277        jQuery(this).delay(1000).animate({opacity:1,right:"0px"},600);
278      }); 
279    });
280
281    jQuery('.from-right.delay-1400').each(function () {
282        "use strict";
283      jQuery(this).appear(function() {
284        jQuery(this).delay(1400).animate({opacity:1,right:"0px"},600);
285      }); 
286    });
287
288    jQuery('.fade-in.delay-normal').each(function () {
289        "use strict";
290      jQuery(this).appear(function() {
291        jQuery(this).delay(150).animate({opacity:1,right:"0px"},600);
292      }); 
293    });
294
295
296    /*-------------------------------  Scroll to Top ----------------------------*/
297    jQuery(window).scroll(function() {
298        "use strict";
299      if ($(this).scrollTop() > 200) {
300       $('#scroll-to-top').fadeIn('slow');
301     } else {
302      $('#scroll-to-top').fadeOut('slow');
303    }
304  }); 
305
306    jQuery('#scroll-to-top').click(function(){
307        "use strict";
308      jQuery("html,body").animate({ scrollTop: 0 }, 1000);
309      return false;
310    });
311
312    jQuery('.donate').click(function(){
313        "use strict";
314      jQuery('html,body').animate({
315        scrollTop: $("#donate").offset().top},
316        'slow');
317    });
318
319
320  });
321
322
323/*-----------------------------------------------------------------------------------*/
324/*   troggle hide and show donate button 
325/*-----------------------------------------------------------------------------------*/ 
326
327jQuery('.single-causes-post .btn-toggle').click(function(){
328  jQuery("#accordion").toggle();
329});
330
331
332/*------------------------------Contact Form 7 Submit Btn  ----------------------*/
333jQuery('.wpcf7-form .submit').parent().addClass('submit-btn-container btn custom-btn angle-effect');
334
335
336
337/*------------------------------Menu overlay  ----------------------*/
338
339jQuery(document).ready(function ($) {
340   "use strict";
341
342    $('[data-popup-target]').click(function () {
343        $('html').addClass('overlay');
344        var activePopup = $(this).attr('data-popup-target');
345        $(activePopup).addClass('visible');
346 
347    });
348 
349    $(document).keyup(function (e) {
350        if (e.keyCode == 27 && $('html').hasClass('overlay')) {
351            clearPopup();
352        }
353    });
354 
355    $('.popup-exit').click(function () {
356        clearPopup();
357 
358    });
359 
360    $('.popup-overlay').click(function () {
361        clearPopup();
362    });
363 
364    function clearPopup() {
365        $('.popup.visible').addClass('transitioning').removeClass('visible');
366        $('html').removeClass('overlay');
367 
368        setTimeout(function () {
369            $('.popup').removeClass('transitioning');
370        }, 200);
371    }
372 
373});
374
375
376/*-----------------------------------------------------------------------------------*/
377/*  menu scrooling 
378/*-----------------------------------------------------------------------------------*/ 
379
380jQuery(function(cash) {
381  "use strict";
382  jQuery('#headernavigation li a[href^="#"], .boxed-menus .menu-item a[href^="#"]').click(function() {
383    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
384      var target = jQuery(this.hash);
385      target = target.length ? target : jQuery('[name=' + this.hash.slice(1) +']');
386      if (target.length) {
387        jQuery('html,body').animate({
388          scrollTop: target.offset().top -70
389        }, 1000);
390        return false;
391      }
392    }
393  });
394});
395
396/**  hide nav menu when click menu link.
397--------------------------------------------------------------------------------------------------- */
398
399jQuery(document).ready(function ($) {
400 "use strict";
401  jQuery("#main-menu li a").click(function(event) {
402        // check if window is small enough so dropdown is created
403        jQuery("#nav-collapse").removeClass("in").addClass("collapse");
404      });
405
406});

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.