Вход Регистрация
Файл: error-kitty/node_modules/mocha/lib/reporters/templates/script.html
Строк: 39
<?php
<script>

headings = [];

onload = function(){
  
headings document.querySelectorAll('h2');
};

onscroll = function(e){
  var 
heading find(window.scrollY);
  if (!
heading) return;
  var 
links document.querySelectorAll('#menu a')
    , 
link;

  for (var 
0len links.lengthlen; ++i) {
    
link links[i];
    
link.className link.getAttribute('href') == '#' heading.id
      
'active'
      
'';
  }
};

function 
find(y) {
  var 
headings.length
    
heading;

  while (
i--) {
    
heading headings[i];
    if (
>= heading.offsetTop) {
      return 
heading;
    }
  }
}
</
script>
?>
Онлайн: 0
Реклама