code: function scrollTo (el, fromEl, toEl, options) {
    toEl = (toEl && $(toEl)) || document.body
  
    const docHeight = height(document)
    const winHeight = height(window)
  
    let target = offset(toEl).top - options.offset
    if (target + winHeight > docHeight) {
      target = docHeight - winHeight
    }
  
    if (!trigger(el, 'beforeScroll', { from: fromEl, to: toEl })) {
      return
    }
  
    const start = Date.now()
    const startY = window.pageYOffset
    const step = () => {
      const currentY = startY + (target - startY) * ease(
        clamp((Date.now() - start) / options.duration)
      )
  
      window.scrollTo(window.pageXOffset, currentY)
  
      // scroll more if we have not reached our destination
      if (currentY !== target) {
        requestAnimationFrame(step)
      } else {
        trigger(el, 'afterScroll', { from: fromEl, to: toEl })
      }
    }
  
    step()
  }
docs: Copyright (c) 2013-2018 YOOtheme GmbH, getuikit.com