PageSourceSearch

https://www.feetnet.com/templates/footandankleinstitute/js/scripts.js

js feetnet.com collected 2026-09-28 09:14:44 UTC 7,850 bytes, 235 lines download raw bytes

1jQuery(document).ready(function() {
2  // Animations (only if viewportChecker plugin is loaded)
3  if (typeof jQuery.fn.viewportChecker === 'function') {
4    jQuery('.rha').addClass("hidden").viewportChecker({
5      classToAdd: 'gently',
6      classToRemove: 'hidden',
7      offset: 10,
8      invertBottomOffset: true,
9      repeat: false,
10      callbackFunction: function(elem, action){},
11      scrollHorizontal: false
12    });
13    jQuery('.fromr').addClass("hidden").viewportChecker({
14      classToAdd: 'fromright',
15      classToRemove: 'hidden',
16      offset: 10,
17      invertBottomOffset: true,
18      repeat: false,
19      callbackFunction: function(elem, action){},
20      scrollHorizontal: false
21    });
22    jQuery('.froml').addClass("hidden").viewportChecker({
23      classToAdd: 'fromleft',
24      classToRemove: 'hidden',
25      offset: 10,
26      invertBottomOffset: true,
27      repeat: false,
28      callbackFunction: function(elem, action){},
29      scrollHorizontal: false
30    });
31    jQuery('.blogs-list>.k2ItemsBlock>ul>li:first-child').addClass("hidden").viewportChecker({
32      classToAdd: 'animate__animated animate__bounceInLeft',
33      classToRemove: 'hidden',
34      offset: 10,
35      invertBottomOffset: true,
36      repeat: false,
37      callbackFunction: function(elem, action){},
38      scrollHorizontal: false
39    });
40    jQuery('.blogs-list>.k2ItemsBlock>ul>li:nth-child(2)').addClass("hidden").viewportChecker({
41      classToAdd: 'animate__animated animate__bounceIn',
42      classToRemove: 'hidden',
43      offset: 10,
44      invertBottomOffset: true,
45      repeat: false,
46      callbackFunction: function(elem, action){},
47      scrollHorizontal: false
48    });
49    jQuery('.blogs-list>.k2ItemsBlock>ul>li:nth-child(3)').addClass("hidden").viewportChecker({
50      classToAdd: 'animate__animated animate__bounceInRight',
51      classToRemove: 'hidden',
52      offset: 10,
53      invertBottomOffset: true,
54      repeat: false,
55      callbackFunction: function(elem, action){},
56      scrollHorizontal: false
57    });
58  }
59
60  // Sticky nav on scroll: show fixed bar when scrolled past 100px
61  function applyStickyNav() {
62    var scrollTop = window.pageYOffset !== undefined
63      ? window.pageYOffset
64      : (document.documentElement || document.body.parentNode || document.body).scrollTop;
65    var slideNav = document.querySelector('nav.slide') || document.querySelector('nav.inner-nav.slide');
66    if (slideNav) {
67      if (scrollTop > 100) {
68        slideNav.classList.add('fixed');
69        document.body.classList.add('nav-fixed');
70      } else {
71        slideNav.classList.remove('fixed');
72        document.body.classList.remove('nav-fixed');
73      }
74    }
75  }
76
77  if (window.addEventListener) {
78    window.addEventListener('scroll', applyStickyNav, { passive: true });
79    window.addEventListener('load', applyStickyNav);
80  }
81  jQuery(window).on('scroll', applyStickyNav);
82  jQuery(window).on('load', applyStickyNav);
83  applyStickyNav();
84
85  //scroll to top
86  jQuery(window).scroll(function(event) {
87    if(jQuery(this).scrollTop() > 300) {
88      jQuery(".scroll-to-top").addClass('active',1000,'linear');
89    }
90    else {
91      jQuery(".scroll-to-top").removeClass('active')
92    }
93  });
94
95  jQuery(".scroll-to-top").on('click', function() {
96    jQuery("html, body").animate({ scrollTop: 0 }, "slow");
97    return false;
98  });
99
100  function isMobileMenuLayout() {
101    return window.matchMedia('(max-width: 940px)').matches;
102  }
103
104  function clearSubmenuInlineStyles($ul) {
105    if (!$ul.length || !$ul[0]) {
106      return;
107    }
108    var el = $ul[0];
109    el.style.removeProperty('display');
110    el.style.removeProperty('visibility');
111    el.style.removeProperty('opacity');
112    el.style.removeProperty('max-height');
113    el.style.removeProperty('overflow-y');
114    el.style.removeProperty('pointer-events');
115  }
116
117  function closeAllDropdownsIn($root) {
118    $root.find('li.parent.dropdown-open, li.deeper.dropdown-open').each(function() {
119      var $li = jQuery(this);
120      clearSubmenuInlineStyles($li.children('ul'));
121      $li.removeClass('dropdown-open');
122    });
123  }
124
125  // Mobile menu: only ONE fullscreen .topmenu — toggle the .topmenu in THIS nav only (two navs duplicate position-1)
126  jQuery('.hamburger').on('click', function() {
127    var $nav = jQuery(this).closest('nav');
128    var $topmenu = $nav.find('.topmenu');
129    var $thisHam = jQuery(this);
130    var $allHam = jQuery('.hamburger');
131    var $allTop = jQuery('.topmenu');
132
133    if ($thisHam.hasClass('is-active')) {
134      $allHam.removeClass('is-active');
135      $allTop.removeClass('active');
136      closeAllDropdownsIn($allTop);
137    } else {
138      $allHam.removeClass('is-active');
139      $allTop.removeClass('active');
140      closeAllDropdownsIn($allTop);
141      $thisHam.addClass('is-active');
142      $topmenu.addClass('active');
143    }
144  });
145
146  // Dropdown: desktop = hover; mobile = tap on separator (hover + duplicate menus caused wrong link hits)
147  var DEBUG_DROPDOWN = false;
148  function debugLog() {
149    if (DEBUG_DROPDOWN && window.console && window.console.log) {
150      window.console.log.apply(window.console, ['[dropdown]'].concat(Array.prototype.slice.call(arguments)));
151    }
152  }
153
154  jQuery('.topmenu').on('mouseenter', 'li.parent, li.deeper', function() {
155    if (isMobileMenuLayout()) {
156      return;
157    }
158    var $li = jQuery(this);
159    debugLog('mouseenter');
160    $li.addClass('dropdown-open');
161    $li.siblings().removeClass('dropdown-open');
162    var $ul = $li.children('ul');
163    if ($ul.length) {
164      var el = $ul[0];
165      el.style.setProperty('display', 'block', 'important');
166      el.style.setProperty('visibility', 'visible', 'important');
167      el.style.setProperty('opacity', '1', 'important');
168      el.style.setProperty('max-height', '3000px', 'important');
169      el.style.setProperty('overflow-y', 'auto', 'important');
170      el.style.setProperty('pointer-events', 'auto', 'important');
171    }
172  });
173
174  jQuery('.topmenu').on('mouseleave', 'li.parent, li.deeper', function() {
175    if (isMobileMenuLayout()) {
176      return;
177    }
178    var $li = jQuery(this);
179    debugLog('mouseleave');
180    clearSubmenuInlineStyles($li.children('ul'));
181    $li.removeClass('dropdown-open');
182  });
183
184  function toggleMobileDropdown($li) {
185    var $ul = $li.children('ul');
186    var opening = !$li.hasClass('dropdown-open');
187    $li.siblings('.parent, .deeper').each(function() {
188      var $s = jQuery(this);
189      clearSubmenuInlineStyles($s.children('ul'));
190      $s.removeClass('dropdown-open');
191    });
192    if (opening) {
193      $li.addClass('dropdown-open');
194      if ($ul.length) {
195        var el = $ul[0];
196        el.style.setProperty('display', 'block', 'important');
197        el.style.setProperty('visibility', 'visible', 'important');
198        el.style.setProperty('opacity', '1', 'important');
199        el.style.setProperty('max-height', '3000px', 'important');
200        el.style.setProperty('overflow-y', 'auto', 'important');
201        el.style.setProperty('pointer-events', 'auto', 'important');
202      }
203    } else {
204      clearSubmenuInlineStyles($ul);
205      $li.removeClass('dropdown-open');
206    }
207  }
208
209  jQuery('.topmenu').on('click', 'li.parent > span.separator, li.deeper > span.separator', function(e) {
210    if (!isMobileMenuLayout()) {
211      return;
212    }
213    e.preventDefault();
214    e.stopPropagation();
215    toggleMobileDropdown(jQuery(this).closest('li'));
216  });
217
218  jQuery('.topmenu').on('click', 'li.parent > a:first-child, li.deeper > a:first-child', function(e) {
219    if (!isMobileMenuLayout()) {
220      return;
221    }
222    var $li = jQuery(this).closest('li');
223    if (!$li.children('ul').length) {
224      return;
225    }
226    var href = (jQuery(this).attr('href') || '').replace(/\s/g, '');
227    if (href && href !== '#' && href.indexOf('javascript:') !== 0) {
228      return;
229    }
230    e.preventDefault();
231    e.stopPropagation();
232    toggleMobileDropdown($li);
233  });
234
235});

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.