PageSourceSearch

https://scholarsedge.biz/wp-content/plugins/mousetrap-extras/js/mousetrap.js?ver=7.1.3

js scholarsedge.biz collected 2026-10-10 01:55:19 UTC 2,417 bytes, 83 lines download raw bytes

1
2// This assigns --i to every child for our Staggered Entrance CSS and ensures it happens only when the grid enters the viewport
3
4document.addEventListener('DOMContentLoaded', () => {
5
6  const observer = new IntersectionObserver(
7    (entries, obs) => {
8      entries.forEach(entry => {
9        if (!entry.isIntersecting) return;
10
11        /* give every child an index that starts at 1 */
12        [...entry.target.children].forEach((el, idx) =>
13          el.style.setProperty('--i', idx + 1)
14        );
15
16        entry.target.classList.add('stagger-start');
17        obs.unobserve(entry.target);      // run only once
18      });
19    },
20    { threshold: 0.15, rootMargin: '0px 0px -10% 0px' }
21  );
22
23  document.querySelectorAll('.stagger-grid').forEach(g => observer.observe(g));
24});
25
26
27
28jQuery(document).ready(function($){
29
30// Scroll to IDs 
31
32// Properly coded themes should use the header tag, but if not, 
33// you'll need to put in the class/id of the header section
34 var headerHeight = $("header").height();
35 var headerHeight = headerHeight + 60;
36
37// Select all links with hashes
38$('a[href*="#"]')
39  // Remove links that don't actually link to anything
40  .not('[href="#"]')
41  .not('[href="#0"]')
42  .click(function(event) {
43    // On-page links
44    if (
45      location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') 
46      && 
47      location.hostname == this.hostname
48    ) {
49      // Figure out element to scroll to
50      var target = $(this.hash);
51      target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
52      // Does a scroll target exist?
53      if (target.length) {
54        // Only prevent default if animation is actually gonna happen
55        event.preventDefault();
56        // Get the height of the header
57        var scrollToPosition = $(target).offset().top - headerHeight;
58        $('html, body').animate({
59          scrollTop: scrollToPosition
60        }, 2000, function() {
61          // Callback after animation
62          // Must change focus!
63          /*
64          var $target = $(target);
65          $target.focus();
66          if ($target.is(":focus")) { // Checking if the target was focused
67            return false;
68          } else {
69            $target.attr('tabindex','-1'); // Adding tabindex for elements not focusable
70            $target.focus(); // Set focus again
71          };
72          */
73        });
74      }
75    }
76  });
77  
78  // END of Scroll To IDs
79
80
81
82
83});

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.