function scrolling(){
  // console.log('- sY:', window.scrollY, '- h:',window.innerHeight, window.scrollY > _toc_offsettop);

  // check table of contents
  if(window.scrollY > _toc_offsettop){
    if(!_toc_isfixed) {
      _toc_isfixed = true;
      _toc.classed('fixed', true);
    }
  } else if(_toc_isfixed) {
    _toc_isfixed = false;
    _toc.classed('fixed', false);
  }

  // check table of scrollpsies
  for(var i=0, l=scrollspy.anchors.length; i < l; i++) {
    scrollspy.anchors[i].progress = Math.max(0, Math.min(1.0, (window.scrollY + window.innerHeight/2 - scrollspy.anchors[i].top) / scrollspy.anchors[i].height));
    scrollspy.anchors[i].visible = scrollspy.anchors[i].top < window.scrollY + window.innerHeight/2 && scrollspy.anchors[i].bottom > window.scrollY
  }

  // throttle in 500 seconds the scrollspy update.
  // console.log(scrollspy)
  scrollspyingthrottle();
}
// activate table of contents items on scrolling
activate table of contents items on scrolling
activate table of contents items on scrolling
function scrolling(){
  if(window.scrollY > _toc_offsettop){
    if(!_toc_isfixed) {
      _toc_isfixed = true;
      _toc.classed('fixed', true);
    }
  } else if(_toc_isfixed) {
    _toc_isfixed = false;
    _toc.classed('fixed', false);
  }
  for(var i=0, l=scrollspy.anchors.length; i < l; i++) {
    scrollspy.anchors[i].progress = Math.max(0, Math.min(1.0, (window.scrollY + window.innerHeight/2 - scrollspy.anchors[i].top) / scrollspy.anchors[i].height));
    scrollspy.anchors[i].visible = scrollspy.anchors[i].top < window.scrollY + window.innerHeight/2 && scrollspy.anchors[i].bottom > window.scrollY
  }
  scrollspyingthrottle();
}
function scrolling ( ) { if ( window . scrollY > _toc_offsettop ) { if ( ! _toc_isfixed ) { _toc_isfixed = true ; _toc . classed ( 'fixed' , true ) ; } } else if ( _toc_isfixed ) { _toc_isfixed = false ; _toc . classed ( 'fixed' , false ) ; } for ( var i = 0 , l = scrollspy . anchors . length ; i < l ; i ++ ) { scrollspy . anchors [ i ] . progress = Math . max ( 0 , Math . min ( 1.0 , ( window . scrollY + window . innerHeight / 2 - scrollspy . anchors [ i ] . top ) / scrollspy . anchors [ i ] . height ) ) ; scrollspy . anchors [ i ] . visible = scrollspy . anchors [ i ] . top < window . scrollY + window . innerHeight / 2 && scrollspy . anchors [ i ] . bottom > window . scrollY } scrollspyingthrottle ( ) ; }
activate table of contents items on scrolling
activate table of contents items on scrolling
// console.log('- sY:', window.scrollY, '- h:',window.innerHeight, window.scrollY > _toc_offsettop); // check table of contents // check table of scrollpsies // throttle in 500 seconds the scrollspy update. // console.log(scrollspy)