PageSourceSearch

https://isatec.com/static/js/script.js

js isatec.com collected 2026-10-06 16:21:48 UTC 5,095 bytes, 176 lines download raw bytes

1// https://stackoverflow.com/a/488073/6616962
2function isScrolledIntoView(elem)
3{
4    var docViewTop = $(window).scrollTop();
5    var docViewBottom = docViewTop + $(window).height();
6
7    var elemTop = $(elem).offset().top;
8    var elemBottom = elemTop + $(elem).height();
9
10    return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
11}
12
13// https://github.com/daneden/animate.css/
14$.fn.extend({
15  animateCss: function(animationName, callback) {
16    var animationEnd = (function(el) {
17      var animations = {
18        animation: 'animationend',
19        OAnimation: 'oAnimationEnd',
20        MozAnimation: 'mozAnimationEnd',
21        WebkitAnimation: 'webkitAnimationEnd',
22      };
23
24      for (var t in animations) {
25        if (el.style[t] !== undefined) {
26          return animations[t];
27        }
28      }
29    })(document.createElement('div'));
30
31    this.addClass('animated ' + animationName).one(animationEnd, function() {
32      $(this).removeClass('animated ' + animationName);
33
34      if (typeof callback === 'function') callback();
35    });
36
37    return this;
38  },
39});
40
41AOS.init();
42
43$('#navbar-close, #navbar-logo').on('click', function () {
44    $('#navbar').toggleClass('active');
45});
46
47var lastScrollPosition = $(window).scrollTop();
48
49$(window).on('scroll', function () {
50    if ($(window).scrollTop() > 100) {
51        $('#navbar-text').removeClass('active');
52    }
53    else {
54        $('#navbar-text').addClass('active');
55    }
56
57    $('.custom-countup').each(function (index, item) {
58        if (isScrolledIntoView(item)) {
59            $(item).trigger('start-custom-countup').off('start-custom-countup');
60        }
61    });
62
63    var newScrollPosition = $(window).scrollTop();
64    if (newScrollPosition > lastScrollPosition) {
65        // down
66        if (newScrollPosition > 100) {
67            $('#navbar-logo').removeClass('active');
68        }
69    }
70    else {
71        // up
72        $('#navbar-logo').addClass('active');
73    }
74    lastScrollPosition = newScrollPosition;
75
76}).trigger('scroll');
77
78$(window).on('resize', function () {
79    var footerHeight = $('#footer').outerHeight() - 1;
80    // $('#footer-prop').css('height', footerHeight + 'px');
81    AOS.refresh();
82}).trigger('resize');
83
84$('.custom-countup').each(function (index, item) {
85    $(item).on('start-custom-countup', function () {
86        var target = Number($(item).data('count-to'));
87
88        var countAnim = new CountUp(item, 0, target);
89        if (!countAnim.error) {
90            countAnim.start();
91        }
92    });
93});
94
95$('#footer img').on('load', function () {
96    $(window).trigger('resize');
97});
98
99// $('.paroller').paroller();
100
101$('.owl-carousel').each(function (index, item) {
102    var settingsElem = $(item).find('script').first();
103    var settingsObj = JSON.parse($(settingsElem).html());
104    $(settingsElem).remove();
105
106    $(item).owlCarousel(settingsObj);
107});
108
109$('[data-trigger-owl-carousel]').on('click', function () {
110    var data = $(this).data('trigger-owl-carousel').split(',');
111    $(data[0]).trigger(data[1] + '.owl.carousel');
112});
113
114$('.masonry-grid').each(function (index, item) {
115    var grid = $(item).masonry({
116        itemSelector: '.masonry-grid-item',
117        horizontalOrder: true,
118    });
119
120    grid.imagesLoaded().progress(function () {
121        AOS.refresh();
122        grid.masonry('layout');
123    });
124});
125
126// $('.about-forte-case-item').on('mouseenter', function () {
127//     var parent = $(this).closest('.masonry-grid');
128//     $(this).find('.about-forte-case-item-subtitle').stop(true, false).slideDown(400, function () {
129//         $(parent).masonry('layout');
130//     });
131// }).on('mouseleave', function () {
132//     var parent = $(this).closest('.masonry-grid');
133//     $(this).find('.about-forte-case-item-subtitle').stop(true, false).slideUp(400, function () {
134//         $(parent).masonry('layout');
135//     });
136// });
137
138$('.multi-case-item-hover-show').each(function (index, item) {
139    var parent = $(item).closest('.multi-case-item');
140    var mason = $(parent).closest('.masonry-grid');
141
142    $(parent).on('mouseenter', function () {
143        $(this).find('.multi-case-item-hover-show').stop(true, false).slideDown(400, function () {
144            $(mason).masonry('layout');
145        });
146    }).on('mouseleave', function () {
147        $(this).find('.multi-case-item-hover-show').stop(true, false).slideUp(400, function () {
148            $(mason).masonry('layout');
149        });
150    });
151});
152
153var caseStudyList = $('.case-study-masonry-grid');
154if ($(caseStudyList).length > 0) {
155    $('#case-study-list-trigger').on('click', function () {
156        var children = $(caseStudyList).children('.d-none');
157        var maxLimit = 6;
158
159        $.each(children, function (index, item) {
160            if (index < maxLimit) {
161                $(item).removeClass('d-none');
162            }
163            else {
164                return false;
165            }
166        });
167
168        $(caseStudyList).on('layoutComplete', function () {
169            AOS.refreshHard();
170        }).masonry('layout');
171
172        if ($(caseStudyList).children('.d-none').length == 0) {
173            $(this).addClass('d-none');
174        }
175    });
176}

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.