PageSourceSearch

https://recodh.org/wp-content/themes/kunco/js/main.js?ver=6.9.10

js recodh.org collected 2026-10-08 00:04:38 UTC 14,003 bytes, 408 lines download raw bytes

1(function($) {
2  "use strict";
3  $('.document').ready(function(){
4    $('.gva-offcanvas-content ul.gva-mobile-menu > li:has(ul)').addClass("has-sub");
5    $('.gva-offcanvas-content ul.gva-mobile-menu > li:has(ul) > a').after('<span class="caret"></span>');
6    $( document ).on('click', '.gva-offcanvas-content ul.gva-mobile-menu > li > .caret', function(e){
7      e.preventDefault();
8      var checkElement = $(this).next();
9      $('.gva-offcanvas-content ul.gva-mobile-menu > li').removeClass('menu-active');
10      $(this).closest('li').addClass('menu-active'); 
11      
12      if((checkElement.is('.submenu-inner')) && (checkElement.is(':visible'))) {
13        $(this).closest('li').removeClass('menu-active');
14        checkElement.slideUp('normal');
15      }
16      
17      if((checkElement.is('.submenu-inner')) && (!checkElement.is(':visible'))) {
18        $('.gva-offcanvas-content ul.gva-mobile-menu .submenu-inner:visible').slideUp('normal');
19        checkElement.slideDown('normal');
20      }
21      
22      if (checkElement.is('.submenu-inner')) {
23        return false;
24      } else {
25        return true;  
26      }   
27    })
28  })
29
30   $( document ).on( 'click', '.canvas-menu.gva-offcanvas > a.dropdown-toggle', function(e) {
31    e.preventDefault();
32    var $style = $(this).data('canvas');
33    if($('.gva-offcanvas-content' + $style).hasClass('open')){
34      $('.gva-offcanvas-content' + $style).removeClass('open');
35      $('#gva-overlay').removeClass('open');
36      $('#wp-main-content').removeClass('blur');
37    }else{
38      $('.gva-offcanvas-content' + $style).addClass('open');
39      $('#gva-overlay').addClass('open');
40      $('#wp-main-content').addClass('blur');
41    }
42  });
43  $( document ).on( 'click', '#gva-overlay', function() {
44    $(this).removeClass('open');
45    $('.gva-offcanvas-content').removeClass('open');
46    $('#wp-main-content').removeClass('blur');
47  })
48  $( document ).on( 'click', '.close-canvas', function() {
49    $('.gva-offcanvas-content').removeClass('open');
50    $('#gva-overlay').removeClass('open');
51    $('#wp-main-content').removeClass('blur');
52  })
53       
54  //------- OWL carousle init  ---------------
55  jQuery(document).ready(function(){
56    function init_carousel_owl(){
57      $('.init-carousel-owl').each(function(){
58        var items = $(this).data('items') ? $(this).data('items') : 5;
59        var items_lg = $(this).data('items_lg') ? $(this).data('items_lg') : 4;
60        var items_md = $(this).data('items_md') ? $(this).data('items_md') : 3;
61        var items_sm = $(this).data('items_sm') ? $(this).data('items_sm') : 2;
62        var items_xs = $(this).data('items_xs') ? $(this).data('items_xs') : 1;
63        var loop = $(this).data('loop') ? $(this).data('loop') : false;
64        var speed = $(this).data('speed') ? $(this).data('speed') : 200;
65        var auto_play = $(this).data('auto_play') ? $(this).data('auto_play') : false;
66        var auto_play_speed = $(this).data('auto_play_speed') ? $(this).data('auto_play_speed') : false;
67        var auto_play_timeout = $(this).data('auto_play_timeout') ? $(this).data('auto_play_timeout') : 1000;
68        var auto_play_hover = $(this).data('auto_play_hover') ? $(this).data('auto_play_hover') : false;
69        var navigation = $(this).data('navigation') ? $(this).data('navigation') : false;
70        var rewind_nav = $(this).data('rewind_nav') ? $(this).data('rewind_nav') : false;
71        var pagination = $(this).data('pagination') ? $(this).data('pagination') : false;
72        var mouse_drag = $(this).data('mouse_drag') ? $(this).data('mouse_drag') : false;
73        var touch_drag = $(this).data('touch_drag') ? $(this).data('touch_drag') : false;
74
75        $(this).owlCarousel({
76            nav: navigation,
77            autoplay: auto_play,
78            autoplayTimeout: auto_play_timeout,
79            autoplaySpeed: auto_play_speed,
80            autoplayHoverPause: auto_play_hover,
81            navText: [ '<i class="gv-icon-164"></i>', '<i class="gv-icon-165"></i>' ],
82            autoHeight: false,
83            loop: loop, 
84            dots: pagination,
85            rewind: rewind_nav,
86            smartSpeed: speed,
87            mouseDrag: mouse_drag,
88            touchDrag: touch_drag,
89            responsive : {
90                0 : {
91                  items: 1,
92                  nav: false
93                },
94                580 : {
95                  items : items_xs,
96                  nav: false
97                },
98                768 : {
99                  items : items_sm,
100                  nav: false
101                },
102                992: {
103                  items : items_md
104                },
105                1200: {
106                  items: items_lg
107                },
108                1400: {
109                  items: items
110                }
111            }
112        }); 
113      }); 
114    }  
115
116  init_carousel_owl(); 
117
118  /* ============ Isotope ==============*/
119  if ( $.fn.isotope ) {
120    if($('.isotope-items').length){
121      $( '.isotope-items' ).each(function() {
122        var $el = $( this ),
123            $filter = $( '.portfolio-filter a'),
124            $loop =  $( this );
125
126        $loop.isotope();
127        
128        $loop.imagesLoaded(function() {
129          $loop.isotope( 'layout' );
130        });
131      
132        if ( $filter.length > 0 ) {
133          $filter.on( 'click', function( e ) {
134            e.preventDefault();
135            var $a = $(this);
136            $filter.removeClass( 'active' );
137            $a.addClass( 'active' );
138            $loop.isotope({ filter: $a.data( 'filter' ) });
139          });
140        };
141      });
142    }
143  };
144
145  $('[data-load="ajax"] a').on('click', function(){
146    var $href = $(this).attr('href');
147    var self = $(this);
148    var main = $($href);
149    var main_products = $($href).find('.tab-content-products');
150    var height = self.parents('.widget-content').find('.tab-pane.active').height();
151
152    if ( main.length > 0 && main.data('loaded') == false ) {
153      main.data('loaded', 'true');
154      var loading = $('<div class="ajax-loading"></div>');
155      loading.css('height', height);
156      main_products.html(loading);
157      $.ajax({
158          url: ajaxurl,
159          type:'POST',
160          dataType: 'html',
161          _ajax_nonce_kunco_tabs_ajax: 'kunco_tabs_product_ajax',
162          data:  'action=kunco_ajax_load_product_tab&columns=' + main.data('columns') + '&style=' + main.data('style') + '&product_type=' + main.data('type') + '&number=' + main.data('number') + '&categories=' + main.data('categories') + '&row=' + main.data('row')
163      }).done(function(reponse) {
164         main_products.html( reponse );
165         init_carousel();
166        });
167        return true;
168     }
169  });
170
171  /*-------------Milestone Counter----------*/
172  jQuery('.milestone-block').each(function() {
173    jQuery(this).appear(function() {
174      var $endNum = parseInt(jQuery(this).find('.milestone-number').text());
175      jQuery(this).find('.milestone-number').countTo({
176        from: 0,
177        to: $endNum,
178        speed: 4000,
179        refreshInterval: 60,
180        formatter: function (value, options) {
181          value = value.toFixed(options.decimals);
182          value = value.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
183          return value;
184        }
185      });
186    },{accX: 0, accY: 0});
187  });
188
189    /*----------------------------------------------------*/
190  /*  Pie Charts
191  /*----------------------------------------------------*/
192  var pieChartClass = 'pieChart',
193        pieChartLoadedClass = 'pie-chart-loaded';
194    
195  function initPieCharts() {
196    var chart = $('.' + pieChartClass);
197    chart.each(function() {
198      $(this).appear(function() {
199        var $this = $(this),
200          chartBarColor = ($this.data('bar-color')) ? $this.data('bar-color') : "#F54F36",
201          chartBarWidth = ($this.data('bar-width')) ? ($this.data('bar-width')) : 150
202        if( !$this.hasClass(pieChartLoadedClass) ) {
203          $this.easyPieChart({
204            animate: 2000,
205            size: chartBarWidth,
206            lineWidth: 5,
207            scaleColor: false,
208            trackColor: "#DCDEE0",
209            barColor: chartBarColor,
210            lineCap: 'square',
211          }).addClass(pieChartLoadedClass);
212        }
213      });
214    });
215  }
216  initPieCharts();
217  
218  /*----------- Animation Progress Bars --------------------*/
219  $("[data-progress-animation]").each(function() {
220    var $this = $(this);
221    $this.appear(function() {
222      var delay = ($this.attr("data-appear-animation-delay") ? $this.attr("data-appear-animation-delay") : 1);
223      if(delay > 1) $this.css("animation-delay", delay + "ms");
224      setTimeout(function() { $this.animate({width: $this.attr("data-progress-animation")}, 800);}, delay);
225    }, {accX: 0, accY: -50});
226  });
227
228  //===== Popup video ============
229  $('.popup-video').magnificPopup({
230    type: 'iframe',
231    fixedContentPos: false
232  });
233
234  // ============================================================================
235  // Text Typer
236  // ============================================================================
237  $("[data-typer-targets]", ".rotate-text").typer();
238  
239});
240   
241$(document).ready(function () {
242  
243  $( document ).on( 'click', '.yith-wcwl-add-button.show a', function() {
244    $(this).addClass('loading');
245  });
246
247  $(document).on('click', '.gva-search > a.control-search', function(){
248    if($(this).hasClass('search-open')){
249      $(this).parents('.gva-search').removeClass('open');
250      $(this).removeClass('search-open');
251    }else{
252      $(this).parents('.gva-search').addClass('open');
253      $(this).addClass('search-open');
254      setTimeout(function(){ 
255        $('.gva-main-search .gva-search input.input-search').focus(); 
256      }, 100);
257    }
258  });
259
260  // Masonry Blogs
261  var $container = $('.post-masonry-style');
262  $container.imagesLoaded( function(){
263    $container.masonry({
264      itemSelector : '.item-masory',
265      gutterWidth: 0,
266      columnWidth: 1,
267    }); 
268  });
269
270  //Perfect Scrollbar
271  $('.gva-offcanvas-content .sidebar, .mini-cart-header .dropdown .minicart-content').perfectScrollbar();
272
273  //Tooltip
274  $(function () {
275    $('[data-toggle="tooltip"]').tooltip()
276  })
277
278  // ============================================================================
279  // Scroll to top
280  // ============================================================================
281  function scrolltop() {
282  var offset = 300;
283  var duration = 500;
284
285  jQuery(window).scroll(function() {
286    if (jQuery(this).scrollTop() > offset) {
287      jQuery('.return-top').fadeIn(duration);
288    } else {
289      jQuery('.return-top').fadeOut(duration);
290    }
291  });
292
293  $( document ).on('click', '.return-top', function(event){
294    event.preventDefault();
295    jQuery('html, body').animate({scrollTop: 0}, duration);
296    return false;
297  });
298}
299
300scrolltop();
301
302  // ============================================================================
303  // Fixed top Menu Bar
304  // ============================================================================
305  
306  function init_sticky(){
307    if($('.gv-sticky-mobile').length > 0){
308      var sticky = new Waypoint.Sticky({
309        element: $('.gv-sticky-mobile')[0],
310        wrapper: '<div class="sticky-wrapper-mobile" />',
311      });
312    } 
313
314    if($('.gv-sticky-menu').length > 0){
315      var sticky = new Waypoint.Sticky({
316        element: $('.gv-sticky-menu')[0],
317        offset: 0
318      });
319    } 
320  }
321  init_sticky();
322})
323
324$(document).ready(function(){
325  $(".lightGallery").lightGallery({
326    selector: '.image-item .zoomGallery'
327  });
328  $('.give-block-2 .action-content a').each(function(){
329    $(this).on('click', function(e){
330      if($(this).hasClass('content-close')){
331        $(this).removeClass('content-close');
332        $(this).parents('.give-content').removeClass('content-close');
333      }else{
334        $(this).addClass('content-close');
335        $(this).parents('.give-content').addClass('content-close');
336      }
337    })
338  });
339  $('.give-form-type-multi').each( function(){
340    var $this = this; 
341    $('.give-total-wrap', this).hide();
342    $('.give-donation-level-btn', this).on( 'click', function(){
343      if( $(this).hasClass('give-btn-level-custom') ){
344        $('.give-total-wrap', $this).show();
345      }else {
346        $('.give-total-wrap', $this).hide();
347      }
348    });
349  });
350
351   $('.gva-main-menu a[href*="#"]:not([href="#"])').click(function() {
352    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
353      var target = $(this.hash);
354      target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
355      if (target.length) {
356        $('html, body').animate({
357          scrollTop: target.offset().top
358        }, 1500);
359        return false;
360      }
361    }
362  });
363  
364});
365
366$(window).load(function(){
367  $('ul[data-load*="ajax"], ul.woocommerce-tab-product-info').each(function(){
368    var width = 0;
369    $(this).find('li').each(function(){
370      width = width + $(this).outerWidth();
371    })
372  });
373
374  $('.flex-control-nav.flex-control-thumbs').owlCarousel({
375    nav: true,
376    navText: [ '<i class="gv-icon-164"></i>', '<i class="gv-icon-165"></i>' ],
377    margin: 10,
378    dots: false,
379    responsive : {
380      0 : {
381        items: 1,
382        nav: false
383      },
384      640 : {
385        items : 3,
386        nav: false
387      },
388      768 : {
389        items : 3,
390        nav: false
391      },
392      992: {
393        items : 4
394      },
395      1200: {
396        items: 4
397      },
398      1400: {
399        items: 4
400      }
401    }
402  });
403  var product_title = jQuery('.single-product .product_title').text();
404   jQuery('.woocommerce-product-gallery .flex-control-thumbs img').attr('alt', product_title);
405
406})
407})(jQuery);
408

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.