src/js/build-html.js
function updateFixedSidebarClass () {
    if (options.scrollContainer && document.querySelector(options.scrollContainer)) {
      var top = document.querySelector(options.scrollContainer).scrollTop
    } else {
      var top = document.documentElement.scrollTop || body.scrollTop
    }
    var posFixedEl = document.querySelector(options.positionFixedSelector)

    if (options.fixedSidebarOffset === 'auto') {
      options.fixedSidebarOffset = document.querySelector(options.tocSelector).offsetTop
    }

    if (top > options.fixedSidebarOffset) {
      if (posFixedEl.className.indexOf(options.positionFixedClass) === -1) {
        posFixedEl.className += SPACE_CHAR + options.positionFixedClass
      }
    } else {
      posFixedEl.className = posFixedEl.className.split(SPACE_CHAR + options.positionFixedClass).join('')
    }
  }
function updateFixedSidebarClass () {
    if (options.scrollContainer && document.querySelector(options.scrollContainer)) {
      var top = document.querySelector(options.scrollContainer).scrollTop
    } else {
      var top = document.documentElement.scrollTop || body.scrollTop
    }
    var posFixedEl = document.querySelector(options.positionFixedSelector)

    if (options.fixedSidebarOffset === 'auto') {
      options.fixedSidebarOffset = document.querySelector(options.tocSelector).offsetTop
    }

    if (top > options.fixedSidebarOffset) {
      if (posFixedEl.className.indexOf(options.positionFixedClass) === -1) {
        posFixedEl.className += SPACE_CHAR + options.positionFixedClass
      }
    } else {
      posFixedEl.className = posFixedEl.className.split(SPACE_CHAR + options.positionFixedClass).join('')
    }
  }
function updateFixedSidebarClass ( ) { if ( options . scrollContainer && document . querySelector ( options . scrollContainer ) ) { var top = document . querySelector ( options . scrollContainer ) . scrollTop } else { var top = document . documentElement . scrollTop || body . scrollTop } var posFixedEl = document . querySelector ( options . positionFixedSelector ) if ( options . fixedSidebarOffset === 'auto' ) { options . fixedSidebarOffset = document . querySelector ( options . tocSelector ) . offsetTop } if ( top > options . fixedSidebarOffset ) { if ( posFixedEl . className . indexOf ( options . positionFixedClass ) === - 1 ) { posFixedEl . className += SPACE_CHAR + options . positionFixedClass } } else { posFixedEl . className = posFixedEl . className . split ( SPACE_CHAR + options . positionFixedClass ) . join ( '' ) } }
Update fixed sidebar class.
@return {HTMLElement}
Update fixed sidebar class .