PHP Classes

File: WITheme/WICMS/admin/js/plugins/textEditor/tinymce_4.2.6_dev/tinymce/tests/coverage/js/reporter.js

Recommend this page to a friend!
  Classes of Jules Warner   WICMS   WITheme/WICMS/admin/js/plugins/textEditor/tinymce_4.2.6_dev/tinymce/tests/coverage/js/reporter.js   Download  
File: WITheme/WICMS/admin/js/plugins/textEditor/tinymce_4.2.6_dev/tinymce/tests/coverage/js/reporter.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: WICMS
Database driven content management system with PDO
Author: By
Last change:
Date: 7 years ago
Size: 587 bytes
 

Contents

Class file image Download
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 i = 0, len = links.length; i < len; ++i) { link = links[i]; link.className = link.getAttribute('href') == '#' + heading.id ? 'active' : ''; } }; function find(y) { var i = headings.length , heading; while (i--) { heading = headings[i]; if (y > heading.offsetTop) { return heading; } } }