assets/js/academia.js
/**
   * Responsive hash scrolling.
   * Check for a URL hash as an anchor.
   * If it exists on current page, scroll to it responsively.
   * If `target` argument omitted (e.g. after event), assume it's the window's hash.
   */
Responsive hash scrolling.
Check for a URL hash as an anchor.
If it exists on current page, scroll to it responsively.
If `target` argument omitted , assume it's the window's hash.
Responsive hash scrolling . Check for a URL hash as an anchor . If it exists on current page scroll to it responsively . If ` target ` argument omitted assume it ' s the window ' s hash .
function scrollToAnchor(target) {
    target = (typeof target === 'undefined' || typeof target === 'object') ? window.location.hash : target;
    target = target.replace(/:/g, '\\:');
    if ($(target).length) {
      $('body').addClass('scrolling');
      $('html, body').animate({
        scrollTop: $(target).offset().top - navbar_offset
      }, 600, function () {
        $('body').removeClass('scrolling');
      });
    }
  }
function scrollToAnchor ( target ) { target = ( typeof target === 'undefined' || typeof target === 'object' ) ? window . location . hash : target ; target = target . replace ( / : / g , '\\:' ) ; if ( $ ( target ) . length ) { $ ( 'body' ) . addClass ( 'scrolling' ) ; $ ( 'html, body' ) . animate ( { scrollTop : $ ( target ) . offset ( ) . top - navbar_offset } , 600 , function ( ) { $ ( 'body' ) . removeClass ( 'scrolling' ) ; } ) ; } }
Responsive hash scrolling.
Responsive hash scrolling .
// If `target` is undefined or HashChangeEvent object, set it to window's hash. // Escape colons from IDs, such as those found in Markdown footnote links. // If target element exists, scroll to it taking into account fixed navigation bar offset.