PageSourceSearch

https://todo.net.pl/wp-content/themes/acens/js/custom.js?ver=7.1.3

js todo.net.pl collected 2026-10-08 00:17:30 UTC 19,376 bytes, 595 lines download raw bytes

1/* ----------------------------------------------------------------
2
3[ Custom settings ]
4
501. ScrollIt
602. Preloader
703. Navbar scrolling background
804. Close navbar-collapse when a clicked
905. Sections background image from data background
1006. Slider-Fade owlCarousel
1107. Works owlCarousel
1208. Services owlCarousel
1309. Gallery owlCarousel
1410. Blog owlCarousel 
1511. Team owlCarousel 
1612. Clients owlCarousel
1713. Testimonials owlCarousel
1814. MagnificPopup
1915. Accordion
2016. Isotope Active Masonry Gallery
2117. Animations
2218. YouTubePopUp
2319. Parallaxie
2420. Tooltip
2521. Wow Animated
2622. Splitting Text
2723. Reveal Effect
2824. Scroll back to top
2925. Contact Form
3026. Skills circle
31
32------------------------------------------------------------------- */
33
34jQuery( document ).ready( function( $ ) {
35    'use strict';
36    var wind = $(window);
37    // ScrollIt
38    $.scrollIt({
39        upKey: 38, // key code to navigate to the next section
40        downKey: 40, // key code to navigate to the previous section
41        easing: 'swing', // the easing function for animation
42        scrollTime: 600, // how long (in ms) the animation takes
43        activeClass: 'active', // class given to the active nav element
44        onPageChange: null, // function(pageIndex) that is called when page is changed
45        topOffset: -70 // offste (in px) for fixed top navigation
46    });
47
48    // Preloader
49    $("#preloader").fadeOut(500);
50    $(".preloader-bg").delay(500).fadeOut(500);
51    var wind = $(window);
52    
53    // Navbar scrolling background
54    wind.on("scroll", function () {
55        var bodyScroll = wind.scrollTop(),
56            navbar = $(".navbar"),
57            logo = $(".navbar .logo1> img");
58        if (bodyScroll > 100) {
59            navbar.addClass("nav-scroll");
60            logo.attr('src', 'https://shthemes.net/demosd/acens/wp-content/uploads/2024/03/logo-dark.png');
61        } else {
62            navbar.removeClass("nav-scroll");
63            logo.attr('src', 'https://shthemes.net/demosd/acens/wp-content/uploads/2024/03/logo-light.png');
64        }
65    });
66$(document).ready(function () {
67    var wind = $(window),
68        navbar = $(".navbar"),
69        logo = $(".dark .navbar .logo1 > img"),
70        firstSection;
71
72    // Sprawdzenie, czy jesteśmy na stronie głównej (możesz zmienić warunek na bardziej precyzyjny)
73    if ($(".elementor-element-9b8cf44").length > 0) {
74        firstSection = $(".elementor-element-9b8cf44"); // Na stronie głównej
75    } else {
76        firstSection = $(".banner-header"); // Na pozostałych stronach
77    }
78
79    if (firstSection.length > 0) {
80        var firstSectionOffset = firstSection.offset().top + firstSection.outerHeight(); // Pobieramy koniec tej sekcji
81
82        wind.on("scroll", function () {
83            var bodyScroll = wind.scrollTop();
84            
85            if (bodyScroll > firstSectionOffset) { // Jeśli przewiniemy za wybraną sekcję
86                navbar.addClass("nav-scroll");
87                logo.attr('src', 'https://shthemes.net/demosd/acens/wp-content/uploads/2024/03/logo-light.png');
88            } else {
89                navbar.removeClass("nav-scroll");
90                logo.attr('src', 'https://shthemes.net/demosd/acens/wp-content/uploads/2024/03/logo-light.png');
91            }
92        });
93    }
94});
95
96    // Close navbar-collapse when a clicked
97    $(".navbar-nav .dropdown-item a").on('click', function () {
98        $(".navbar-collapse").removeClass("show");
99    });
100    
101    // Close mobile menu "on click"
102    $(function(){ 
103         var navMain = $(".scroll-init");
104         navMain.on("click", "a", null, function () {
105             navMain.collapse('hide');
106         });
107     });
108    
109    // Sections background image from data background
110    var pageSection = $(".bg-img, section");
111    pageSection.each(function (indx) {
112        if ($(this).attr("data-background")) {
113            $(this).css("background-image", "url(" + $(this).data("background") + ")");
114        }
115    });
116    
117    // Slider-Fade owlCarousel
118    var owl = $('.header .owl-carousel');
119    $('.slider-fade .owl-carousel').owlCarousel({
120        items: 1,
121        loop: true,
122        dots: true,
123        margin: 0,
124        mouseDrag: true,
125        autoplay: true,
126        autoplayTimeout: 5000,
127        animateOut: 'fadeOut',
128        autoplayHoverPause: true,
129        nav: true,
130        navText: ['<i class="fa-solid fa-angle-left"></i>', '<i class="fa-solid fa-angle-right"></i>'],
131        responsiveClass: true,
132        responsive: {
133            0: {
134                nav: false
135            },
136            600: {
137                nav: false
138            },
139            1000: {
140                nav: true
141            }
142        }
143    });
144    owl.on('changed.owl.carousel', function (event) {
145        var item = event.item.index - 2; // Position of the current item
146        $('h6').removeClass('animated fadeInUp');
147        $('h1').removeClass('animated fadeInUp');
148        $('p').removeClass('animated fadeInUp');
149        $('.btn-1').removeClass('animated fadeInUp');
150        $('.btn-2').removeClass('animated fadeInUp');
151        $('.owl-item').not('.cloned').eq(item).find('h6').addClass('animated fadeInUp');
152        $('.owl-item').not('.cloned').eq(item).find('h1').addClass('animated fadeInUp');
153        $('.owl-item').not('.cloned').eq(item).find('p').addClass('animated fadeInUp');
154        $('.owl-item').not('.cloned').eq(item).find('.btn-1').addClass('animated fadeInUp');
155        $('.owl-item').not('.cloned').eq(item).find('.btn-2').addClass('animated fadeInUp');
156    });
157    
158    // Works owlCarousel
159    $('.works .owl-carousel').owlCarousel({
160        loop: true,
161        margin: 30,
162        mouseDrag: true,
163        autoplay: true,
164        autoplayTimeout: 5000,
165        dots: true,
166        autoplayHoverPause: true,
167        nav: false,
168        navText: ['<i class="fa-solid fa-angle-left"></i>', '<i class="fa-solid fa-angle-right"></i>'],
169        responsiveClass: true,
170        responsive: {
171            0: {
172                items: 1,
173                dots: true
174            },
175            600: {
176                items: 2
177            },
178            1000: {
179                items: 3
180            }
181        }
182    });
183    
184    // Services owlCarousel
185    $('.services .owl-carousel').owlCarousel({
186        loop: true,
187        margin: 30,
188        mouseDrag: true,
189        autoplay: false,
190        autoplayTimeout: 5000,
191        dots: true,
192        autoplayHoverPause: true,
193        nav: false,
194        navText: ['<i class="fa-solid fa-angle-left"></i>', '<i class="fa-solid fa-angle-right"></i>'],
195        responsiveClass: true,
196        responsive: {
197            0: {
198                items: 1
199            },
200            600: {
201                items: 2
202            },
203            1000: {
204                items: 3
205            }
206        }
207    });
208    
209    // Gallery owlCarousel
210    $('.gallery .owl-carousel').owlCarousel({
211        loop: true
212        , margin: 0
213        , mouseDrag: true
214        , autoplay: true
215        , autoplayTimeout: 4000
216        , dots: false
217        , nav: false
218        , navText: ['<i class="fa-solid fa-angle-left"></i>', '<i class="fa-solid fa-angle-right"></i>']
219        , responsiveClass: true
220        , responsive: {
221            0: {
222                items: 3
223            , }
224            , 600: {
225                items: 4
226            }
227            , 1000: {
228                items: 5
229            }
230        }
231    }); 
232    
233    // Blog owlCarousel 
234    $('.blog-home .owl-carousel').owlCarousel({
235        loop: true
236        , margin: 30
237        , mouseDrag: true
238        , autoplay: false
239        , autoplayTimeout: 5000
240        , dots: true
241        , nav: false
242        , navText: ['<i class="fa-solid fa-angle-left"></i>', '<i class="fa-solid fa-angle-right"></i>']
243        , autoplayHoverPause:true
244        , responsiveClass: true
245        , responsive: {
246            0: {
247                items: 1,
248                dots: true
249            , }
250            , 600: {
251                items: 2,
252                dots: true
253            }
254            , 1000: {
255                items: 3
256            }
257        }
258    });
259    
260     // Blog 2 owlCarousel 
261    $('.blog2 .owl-carousel').owlCarousel({
262        loop: true
263        , margin: 30
264        , mouseDrag: true
265        , autoplay: false
266        , autoplayTimeout: 5000
267        , dots: true
268        , nav: false
269        , navText: ['<i class="fa-solid fa-angle-left"></i>', '<i class="fa-solid fa-angle-right"></i>']
270        , autoplayHoverPause:true
271        , responsiveClass: true
272        , responsive: {
273            0: {
274                items: 1,
275                dots: true
276            , }
277            , 600: {
278                items: 2,
279                dots: true
280            }
281            , 1000: {
282                items: 3
283            }
284        }
285    });
286    
287    
288    // Team owlCarousel
289    $('.team .owl-carousel').owlCarousel({
290        loop: true
291        , margin: 30
292        , mouseDrag: true
293        , autoplay: false
294        , autoplayTimeout: 5000
295        , dots: true
296        , nav: false
297        , navText: ['<i class="fa-solid fa-angle-left"></i>', '<i class="fa-solid fa-angle-right"></i>']
298        , autoplayHoverPause:true
299        , responsiveClass: true
300        , responsive: {
301            0: {
302                items: 1,
303                nav: false
304            , }
305            , 600: {
306                items: 2,
307                nav: false
308            }
309            , 1000: {
310                items: 3
311            }
312        }
313    });
314    
315    // Clients owlCarousel
316    $('.clients .owl-carousel').owlCarousel({
317        loop: true
318        , margin: 30
319        , mouseDrag: true
320        , autoplay: true
321        , autoplayTimeout: 5000
322        , dots: false
323        , nav: false
324        , navText: ['<i class="fa-solid fa-angle-left"></i>', '<i class="fa-solid fa-angle-right"></i>']
325        , responsiveClass: true
326        , responsive: {
327            0: {
328                margin: 15
329                , items: 2
330            }
331            , 600: {
332                items: 3
333            }
334            , 1000: {
335                items: 5
336            }
337        }
338    });
339    
340    // Testimonials owlCarousel
341    $('.testimonials .owl-carousel').owlCarousel({
342        loop:true,
343        margin: 30,
344        mouseDrag:true,
345        autoplay: false,
346        autoplayTimeout: 7000,
347        dots: true,
348        nav: false,
349        navText: ['<i class="fa-solid fa-angle-left"></i>', '<i class="fa-solid fa-angle-right"></i>'],
350        responsiveClass:true,
351        responsive:{
352            0:{
353                items: 1,
354            },
355            600:{
356                items: 1,
357            },
358            1000:{
359                items: 2,
360            }
361        }
362    }); 
363    
364    // Magnific Popup
365    $(".img-zoom").magnificPopup({
366        type: "image",
367        closeOnContentClick: !0,
368        mainClass: "mfp-fade",
369        gallery: {
370            enabled: !0,
371            navigateByImgClick: !0,
372            preload: [0, 1]
373        }
374    })
375    $('.magnific-youtube, .magnific-vimeo, .magnific-custom').magnificPopup({
376        disableOn: 700,
377        type: 'iframe',
378        mainClass: 'mfp-fade',
379        removalDelay: 300,
380        preloader: false,
381        fixedContentPos: false
382    });
383    
384    // Accordion
385    if ($(".accordion-box").length) {
386        $(".accordion-box").on("click", ".acc-btn", function () {
387          var outerBox = $(this).parents(".accordion-box");
388          var target = $(this).parents(".accordion");
389
390          if ($(this).next(".acc-content").is(":visible")) {
391            //return false;
392            $(this).removeClass("active");
393            $(this).next(".acc-content").slideUp(300);
394            $(outerBox).children(".accordion").removeClass("active-block");
395          } else {
396            $(outerBox).find(".accordion .acc-btn").removeClass("active");
397            $(this).addClass("active");
398            $(outerBox).children(".accordion").removeClass("active-block");
399            $(outerBox).find(".accordion").children(".acc-content").slideUp(300);
400            target.addClass("active-block");
401            $(this).next(".acc-content").slideDown(300);
402          }
403        });
404      }
405    
406    // Isotope Active Masonry Gallery
407    $('.gallery-items').imagesLoaded(function () {
408        // Add isotope on click filter function
409        $('.gallery-filter li').on('click', function () {
410            $(".gallery-filter li").removeClass("active");
411            $(this).addClass("active");
412            var selector = $(this).attr('data-filter');
413            $(".gallery-items").isotope({
414                filter: selector,
415                animationOptions: {
416                    duration: 750,
417                    easing: 'linear',
418                    queue: false,
419                }
420            });
421            return false;
422        });
423        $(".gallery-items").isotope({
424            itemSelector: '.single-item',
425            layoutMode: 'masonry',
426        });
427    });
428    
429    // Animations
430    var contentWayPoint = function () {
431        var i = 0;
432        $('.animate-box').waypoint(function (direction) {
433            if (direction === 'down' && !$(this.element).hasClass('animated')) {
434                i++;
435                $(this.element).addClass('item-animate');
436                setTimeout(function () {
437                    $('body .animate-box.item-animate').each(function (k) {
438                        var el = $(this);
439                        setTimeout(function () {
440                            var effect = el.data('animate-effect');
441                            if (effect === 'fadeIn') {
442                                el.addClass('fadeIn animated');
443                            } else if (effect === 'fadeInLeft') {
444                                el.addClass('fadeInLeft animated');
445                            } else if (effect === 'fadeInRight') {
446                                el.addClass('fadeInRight animated');
447                            } else {
448                                el.addClass('fadeInUp animated');
449                            }
450                            el.removeClass('item-animate');
451                        }, k * 200, 'easeInOutExpo');
452                    });
453                }, 100);
454            }
455        }, {
456            offset: '85%'
457        });
458    };
459    $(function () {
460        contentWayPoint();
461    });
462    
463    // YouTubePopUp
464    $("a.vid").YouTubePopUp();
465    
466    // Parallaxie
467    $('.parallaxie').parallaxie({
468        speed: 0.2,
469        size: "cover"
470    });
471    
472    // Tooltip   
473    $('[data-tooltip-tit]').hover(function () {
474        $('<div class="div-tooltip-tit"></div>').text($(this).attr('data-tooltip-tit')).appendTo('body').fadeIn('slow');
475    }, function () {
476    $('.div-tooltip-tit').remove();
477    }).mousemove(function (e) {
478        $('.div-tooltip-tit').css({ top: e.pageY + 10, left: e.pageX + 20 })
479    });
480    $('[data-tooltip-sub]').hover(function () {
481        $('<div class="div-tooltip-sub"></div>').text($(this).attr('data-tooltip-sub')).appendTo('body').fadeIn('slow');
482    }, function () {
483    $('.div-tooltip-sub').remove();
484    }).mousemove(function (e) {
485        $('.div-tooltip-sub').css({ top: e.pageY + 60, left: e.pageX + 20 })
486    });
487    
488    // Wow Animated 
489    var wow = new WOW({
490        animateClass: 'animated',
491        offset: 100
492    });
493    wow.init();
494    
495    // Splitting Text
496    $(window).on("load", function () {
497        Splitting();
498    });
499
500    // Reveal Effect
501    var scroll = window.requestAnimationFrame
502    ||
503    // IE Fallback
504    function (callback) {
505      window.setTimeout(callback, 3000)
506    };
507    var elementsToShow = document.querySelectorAll('.reveal-effect');
508    function loop() {
509    Array.prototype.forEach.call(elementsToShow, function (element) {
510      if (isElementInViewport(element)) {
511        element.classList.add('animated');
512      }
513    });
514    scroll(loop);
515  }
516    // Call the loop for the first time
517    loop();
518    // Helper function from: http://stackoverflow.com/a/7557433/274826
519    function isElementInViewport(el) {
520    // special bonus for those using jQuery
521    if (typeof jQuery === "function" && el instanceof jQuery) {
522      el = el[0];
523    }
524    var rect = el.getBoundingClientRect();
525    return (
526      (rect.top <= 0
527        && rect.bottom >= 0)
528      || (rect.bottom >= (window.innerHeight || document.documentElement.clientHeight)
529        && rect.top <= (window.innerHeight || document.documentElement.clientHeight))
530      || (rect.top >= 0
531        && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight))
532    );
533  }
534    
535    // Scroll back to top
536    var progressPath = document.querySelector('.progress-wrap path');
537    var pathLength = progressPath.getTotalLength();
538    progressPath.style.transition = progressPath.style.WebkitTransition = 'none';
539    progressPath.style.strokeDasharray = pathLength + ' ' + pathLength;
540    progressPath.style.strokeDashoffset = pathLength;
541    progressPath.getBoundingClientRect();
542    progressPath.style.transition = progressPath.style.WebkitTransition = 'stroke-dashoffset 10ms linear';
543    var updateProgress = function () {
544        var scroll = $(window).scrollTop();
545        var height = $(document).height() - $(window).height();
546        var progress = pathLength - (scroll * pathLength / height);
547        progressPath.style.strokeDashoffset = progress;
548    }
549    updateProgress();
550    $(window).scroll(updateProgress);
551    var offset = 150;
552    var duration = 550;
553    jQuery(window).on('scroll', function () {
554        if (jQuery(this).scrollTop() > offset) {
555            jQuery('.progress-wrap').addClass('active-progress');
556        } else {
557            jQuery('.progress-wrap').removeClass('active-progress');
558        }
559    });
560    jQuery('.progress-wrap').on('click', function (event) {
561        event.preventDefault();
562        jQuery('html, body').animate({
563            scrollTop: 0
564        }, duration);
565        return false;
566    }) 
567    
568    // Skills circle
569    var c4 = $('.skills-circle .skill');
570    var myVal = $(this).attr('data-value');
571    $(".skills-circle .skill").each(function () {
572        c4.circleProgress({
573            startAngle: -Math.PI / 2 * 1,
574            value: myVal,
575            thickness: 4,
576            size: 140,
577            fill: { color: "#ff5e57" }
578        });
579    });
580    wind.on('scroll', function () {
581        $(".skill-progress .progres").each(function () {
582            var bottom_of_object =
583                $(this).offset().top + $(this).outerHeight();
584            var bottom_of_window =
585                $(window).scrollTop() + $(window).height();
586            var myVal = $(this).attr('data-value');
587            if (bottom_of_window > bottom_of_object) {
588                $(this).css({
589                    width: myVal
590                });
591            }
592        });
593    });
594 
595} );

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.