PageSourceSearch

https://academy21.co.uk/wp-content/themes/nw-theme/js/nw.js?ver=1.0

js academy21.co.uk collected 2026-10-07 15:15:21 UTC 5,592 bytes, 204 lines download raw bytes

1
2function animateNumbers() {
3    jQuery('span.animated-number').each(function (i,el) {
4
5        var el = jQuery(el);
6        if (el.visible(true)) {
7            if(!jQuery(el).hasClass("animated")) {
8                jQuery(el).addClass("animated");
9
10                var duration = el.attr("data-number") / 100;
11                if(duration < 1000) {
12                    duration = 1000;
13                }
14                if(duration > 3000) {
15                    duration = 3000;
16                }
17                duration = 2000;
18
19                if(el.attr("data-number") % 1 != 0) {
20                    el.text(el.attr("data-number"));
21                } else {
22                    var finalNumber = jQuery(el).attr('data-number');
23                    jQuery({ Counter: 0 }).animate({ Counter: finalNumber }, {
24                        duration: 3000,
25                        easing: 'swing',
26                        /*step: function () {
27                         el.text(Math.ceil(this.Counter));
28                         }*/
29                        step: function (now) {
30                            el.text(Math.ceil(now));
31                        }
32                    });
33                }
34            }
35        }
36    });
37}
38
39
40function addAdditionalPaddingToFirstContentBlock() {
41    // #main-content > .page_builder > .row:first-of-type;
42    var firstContentBlock = jQuery('#main-content > .page_builder > .row:first-of-type');
43
44    if(jQuery(firstContentBlock).length > 0) {
45        // paddingToAdd = jQuery('header').outerHeight(true);
46        // currentTopPaddingCSS = firstContentBlock.css('padding-top');
47        // currentTopPaddingValue = parseInt(currentTopPaddingCSS.replace('px', ''));
48        //
49        // newTopPadding = paddingToAdd + currentTopPaddingValue;
50        // jQuery(firstContentBlock).css("padding-top", newTopPadding + "px");
51    }
52
53}
54
55(function($) {
56
57    var win = jQuery(window);
58    var moduleMods = jQuery(".animate");
59    var slideFromLeftMods = jQuery(".slide-from-left");
60    var fadeInMods = jQuery(".fade-me-in");
61    var slideFromRightMods = jQuery(".slide-from-right");
62
63    $.fn.visible = function(partial) {
64
65        var $t            = $(this),
66            $w            = $(window),
67            viewTop       = $w.scrollTop(),
68            viewBottom    = viewTop + $w.height(),
69            _top          = $t.offset().top,
70            _bottom       = _top + $t.height(),
71            compareTop    = partial === true ? _bottom : _top,
72            compareBottom = partial === true ? _top : _bottom;
73
74        return ((compareBottom <= viewBottom) && (compareTop >= viewTop));
75
76    };
77
78})(jQuery);
79
80
81
82jQuery(window).load(function(){
83
84    addAdditionalPaddingToFirstContentBlock();
85
86    setTimeout(
87        function()
88        {
89            animateNumbers();
90        }, 5000);
91
92});
93
94
95
96jQuery(window).scroll(function(event) {
97    animateNumbers();
98});
99
100jQuery(function($) {
101    jQuery(window).scroll(function(){
102        if (jQuery(window).scrollTop() >= 1) {
103            jQuery("header").addClass("sticky");
104        }
105        else {
106            jQuery("header").removeClass("sticky");
107        }
108    });
109    jQuery(document).ready(function(){
110        if(jQuery(window).scrollTop() > 0) {
111            jQuery("header").addClass("sticky");
112        }
113    });
114});
115
116
117
118
119
120function isTouchDevice() {
121    return ((('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0)));
122}
123
124
125
126
127jQuery(document).ready(function() {
128    isTouchDevice();
129});
130
131jQuery(window).load(function(){
132
133});
134
135jQuery(window).on('resize', function(){
136    isTouchDevice();
137});
138
139jQuery(window).on('orientationchange', function(){
140    isTouchDevice();
141});
142
143
144jQuery(document).on('click', 'a.backToTopLink', function(event) {
145    event.preventDefault();
146    jQuery('html, body').animate({
147        scrollTop: (jQuery('div.topOfPage').offset().top)
148    },500);
149});
150
151
152
153
154
155// ------------- Extended jQuery with toggleText() function. ---------- //
156// Example of how to use:
157/*
158jQuery(document).ready(function(){
159    jQuery('button.read_more').click(function(){
160        jQuery(this).toggleText('Read more', 'Read less');
161    })
162});
163*/
164jQuery(document).ready(function() {
165    jQuery.fn.extend({
166        toggleText: function(a, b){
167            return this.text(this.text() == b ? a : b);
168        }
169    });
170});
171// -------------------------------------------------------------------- //
172
173// Animated Field Function
174function addActiveTextAnimation(elem) {
175    jQuery(elem).addClass('active');
176}
177function removeActiveTextAnimation(elem) {
178    jQuery(elem).removeClass('active');
179}
180// Adding active class to circles
181jQuery(document).ready(function(){
182    // If scrolled into view:
183    jQuery(window).scroll(function () {
184        jQuery('span.circle').each(function () {
185            elem = jQuery(this);
186            if (scrolledIntoView(elem) === true) {
187                setTimeout(addActiveTextAnimation, 1200, elem);
188            } else {
189                // removeActiveTextAnimation(elem);
190            }
191        });
192    });
193    // If already in viewport:
194    jQuery(document).ready(function () {
195        jQuery('span.circle').each(function () {
196            elem = jQuery(this);
197            if (scrolledIntoView(elem) === true) {
198                setTimeout(addActiveTextAnimation, 1200, elem);
199            } else {
200                // removeActiveTextAnimation(elem);
201            }
202        });
203    });
204});

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.