(options.scrollspy)||document).onscroll = function () {
    
        // get TOC elements, and viewport position   
        var list = document.getElementById(tocDiv).querySelectorAll('li')
        var divScroll = document.getElementById(options.scrollspy) || document.documentElement
        var divHeight = divScroll.clientHeight || divScroll.offsetHeight 
        
        // loop for each TOC element, add/remove scrollspy class
        for (var i=0; i<list.length; i++) {
          var div = document.getElem