PageSourceSearch

https://reconmr.com/wp-content/themes/recon/js/scripts.js?ver=1

js reconmr.com collected 2026-10-02 17:26:47 UTC 4,709 bytes, 173 lines download raw bytes

1jQuery(document).ready(function ($) {
2
3
4/*===================================*/
5// nice selects
6/*===================================*/
7$('.archiveDropdowns select').niceSelect();
8
9
10/*===================================*/
11// Mobile Menu
12/*===================================*/
13
14$(document).ready(function() {
15
16  $('.mobile-toggle-container').click(function(){
17    $(document).find('html').toggleClass('menu-open');
18  });
19  $('#closeMenu').click(function(){
20    $(document).find('html').removeClass('menu-open');
21  });
22
23});
24
25/*==================================*/
26// Scroll animations
27/*==================================*/
28
29 // Detect request animation frame
30 var scroll = window.requestAnimationFrame ||
31              // IE Fallback
32              function(callback){ window.setTimeout(callback, 1000/60)};
33 var elementsToShow = document.querySelectorAll('.scroll');
34
35 function loop() {
36
37     Array.prototype.forEach.call(elementsToShow, function(element){
38       if (isElementInViewport(element)) {
39         element.classList.add('is-visible');
40       } else {
41         element.classList.remove('is-visible');
42       }
43     });
44
45     scroll(loop);
46 }
47
48 // Call the loop for the first time
49 loop();
50
51 // Helper function from: http://stackoverflow.com/a/7557433/274826
52 function isElementInViewport(el) {
53   // special bonus for those using jQuery
54   if (typeof jQuery === "function" && el instanceof jQuery) {
55     el = el[0];
56   }
57   var rect = el.getBoundingClientRect();
58   return (
59     (rect.top <= 0
60       && rect.bottom >= 0)
61     ||
62     (rect.bottom >= (window.innerHeight || document.documentElement.clientHeight) &&
63       rect.top <= (window.innerHeight || document.documentElement.clientHeight))
64     ||
65     (rect.top >= 0 &&
66       rect.bottom <= (window.innerHeight || document.documentElement.clientHeight))
67   );
68 }
69
70
71/*====================================*/
72// Team Page Bio Popup
73/*====================================*/
74$(document).ready(function() {
75
76  $('.readbio').click(function(e) {
77   $(this).parent().siblings('.bio').addClass('open');
78  });
79
80  $('.closeModal').on('click', function(){
81   $(document).find('.bio').removeClass('open');
82  });
83
84  $('.bio').click(function (event)  {
85   if(!$(event.target).closest('.popup').length && !$(event.target).is('.popup')) {
86     $(".bio").removeClass('open');
87   }
88  });
89
90});
91
92
93/*====================================*/
94// Smooth Scroll
95/*====================================*/
96(function($) {
97  $.fn.SmoothAnchors = function() {
98
99    function scrollBodyTo(destination, hash) {
100
101        // Change the hash first, then do the scrolling. This retains the standard functionality of the back/forward buttons.
102        var scrollmem = $(document).scrollTop();
103        window.location.hash = hash;
104        $(document).scrollTop(scrollmem);
105        $("html,body").animate({
106            scrollTop: destination
107        }, 300);
108
109    }
110
111    if (typeof $().on == "function") {
112        $(document).on('click', 'a[href^="#"]', function() {
113
114            var href = $(this).attr("href");
115
116            if ($(href).length == 0) {
117
118                var nameSelector = "[name=" + href.replace("#", "") + "]";
119
120                if (href == "#") {
121                    scrollBodyTo(0, href);
122                }
123                else if ($(nameSelector).length != 0) {
124                    scrollBodyTo($(nameSelector).offset().top, href);
125                }
126                else {
127                    // fine, we'll just follow the original link. gosh.
128                    window.location = href;
129                }
130            }
131            else {
132                scrollBodyTo($(href).offset().top - 80, href);
133            }
134            return false;
135        });
136    }
137    else {
138        $('a[href^="#"]').click(function() {
139            var href = $(this).attr("href");
140
141            if ($(href).length == 0) {
142
143                var nameSelector = "[name=" + href.replace("#", "") + "]";
144
145                if (href == "#") {
146                    scrollBodyTo(0, href);
147                }
148                else if ($(nameSelector).length != 0) {
149                    scrollBodyTo($(nameSelector).offset().top, href);
150                }
151                else {
152                    // fine, we'll just follow the original link. gosh.
153                    window.location = href;
154                }
155            }
156            else {
157                scrollBodyTo($(href).offset().top - 80, href);
158            }
159            return false;
160        });
161    }
162  };
163})(jQuery);
164
165$(document).ready(function() {
166  $().SmoothAnchors();
167});
168
169//*==============================================================*/
170// end scripts
171//*==============================================================*/
172
173});

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.